fix url() imports

This commit is contained in:
Alexis Sellier
2012-01-21 02:30:56 +01:00
parent 90013bcc97
commit bb5f038615

View File

@@ -1255,7 +1255,7 @@ if (less.mode === 'browser' || less.mode === 'rhino') {
// Used by `@import` directives
//
less.Parser.importer = function (path, paths, callback, env) {
if (path.charAt(0) !== '/' && paths.length > 0) {
if (!/^([a-z]+:)?\//.test(path) && paths.length > 0) {
path = paths[0] + path;
}
// We pass `true` as 3rd argument, to force the reload of the import.