Use original node so that original seperator is used instead of the native one. Fixes unit tests on windows.

This commit is contained in:
Luke Page
2013-02-26 19:02:38 +00:00
parent feed74f3bd
commit 28b8967205

View File

@@ -373,14 +373,14 @@ tree.functions = {
return values.value[index];
},
"data-uri": function(mimetype, filePath) {
"data-uri": function(mimetypeNode, filePathNode) {
if (typeof window !== 'undefined') {
return new less.tree.URL(filePath || mimetype, this.rootpath).eval(this.env);
return new tree.URL(filePathNode || mimetypeNode, this.rootpath).eval(this.env);
}
mimetype = mimetype.value;
filePath = (filePath && filePath.value);
var mimetype = mimetypeNode.value;
var filePath = (filePathNode && filePathNode.value);
var fs = require("fs"),
path = require("path"),
@@ -429,7 +429,7 @@ tree.functions = {
console.warn("Skipped data-uri embedding of %s because its size (%dKB) exceeds IE8-safe %dKB!", filePath, fileSizeInKB, DATA_URI_MAX_KB);
}
return new(tree.URL)(new(tree.Quoted)("'" + filePath + "'", filePath));
return new tree.URL(filePathNode || mimetypeNode, this.rootpath).eval(this.env);
} else if (!this.env.silent) {
// if explicitly disabled (via --no-ie-compat on CLI, or env.ieCompat === false), merely warn
console.warn("WARNING: Embedding %s (%dKB) exceeds IE8's data-uri size limit of %dKB!", filePath, fileSizeInKB, DATA_URI_MAX_KB);