// replace all escaped line breaks
replace(/\\(\r\n|\n)/mg, '');
+ // strip comments one by one
+ replace(function stripComments() {
+ data = CleanCSS._stripComments(context, data);
+ });
+
// inline all imports
replace(function inlineImports() {
data = CleanCSS._inlineImports(data, {
});
});
- // strip comments one by one
- replace(function stripComments() {
- data = CleanCSS._stripComments(context, data);
- });
-
// strip parentheses in urls if possible (no spaces inside)
replace(/url\((['"])([^\)]+)['"]\)/g, function(match, quote, url) {
if (url.match(/[ \t]/g) !== null || url.indexOf('data:') === 0)
'of a file with a resource URI': [
"@import url(test/data/partials/five.css);",
".five{background:url(data:image/jpeg;base64,/9j/)}"
+ ],
+ 'inside a comment': [
+ '/* @import */a { color: red; }',
+ 'a{color:red}'
]
}),
'@import with absolute paths': cssContext({