mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Use original node so that original seperator is used instead of the native one. Fixes unit tests on windows.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user