We were not treating custom URI protocols as remote ones so
they were rewritten as local ones.
* Fixed issue [#599](https://github.com/jakubpawlowicz/clean-css/issues/599) - support for inlined source maps.
+[3.3.5 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.3.4...3.3)
+==================
+
+* Fixed issue [#608](https://github.com/jakubpawlowicz/clean-css/issues/608) - custom URI protocols handling.
+
[3.3.4 / 2015-06-24](https://github.com/jakubpawlowicz/clean-css/compare/v3.3.3...v3.3.4)
==================
}
function isRemote(uri) {
- return uri.indexOf('http://') === 0 || uri.indexOf('https://') === 0 || uri.indexOf('//') === 0;
+ return /^[^:]+?:\/\//.test(uri) || uri.indexOf('//') === 0;
}
function isImport(uri) {
]
})
)
+ .addBatch(
+ optimizerContext('urls custom protocol and url rewriting', {
+ 'simple': [
+ 'a{background:url(app://abc.png)}',
+ 'a{background:url(app://abc.png)}'
+ ],
+ 'complex': [
+ 'a{background:url(git+ssh2://abc.png)}',
+ 'a{background:url(git+ssh2://abc.png)}'
+ ]
+ }, { root: process.cwd(), relativeTo: process.cwd() })
+ )
.addBatch(
optimizerContext('urls whitespace in compatibility mode', {
'keeps spaces as they are': [