tempData.push(data.substring(cursor, nextStart));
var url = data.substring(nextStart + 4, nextEnd).replace(/['"]/g, '');
- if (url[0] != '/' && url.substring(url.length - 4) != '.css') {
+ if (url[0] != '/' && url.indexOf('data:') != 0 && url.substring(url.length - 4) != '.css') {
url = path.relative(toBase, path.join(fromBase, url)).replace(/\\/g, '/');
}
tempData.push('url(' + url + ')');
--- /dev/null
+.five{background:url(data:image/jpeg;base64,/9j/)}
'of a file with an absolute resource path': [
"@import url(test/data/partials/four.css);",
".four{background-image:url(/partials/extra/down.gif)}",
+ ],
+ 'of a file with a resource URI': [
+ "@import url(test/data/partials/five.css);",
+ ".five{background:url(data:image/jpeg;base64,/9j/)}"
]
}),
'@import with absolute paths': cssContext({