mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Merge branch 'patch-8' of https://github.com/bassjobsen/less.js
This commit is contained in:
@@ -40,12 +40,14 @@ module.exports = function(environment) {
|
||||
importManager.queue.splice(importManager.queue.indexOf(path), 1); // Remove the path from the queue
|
||||
|
||||
var importedEqualsRoot = fullPath === importManager.rootFilename;
|
||||
|
||||
if (importOptions.optional && e) {
|
||||
callback(null, {rules:[]}, false, null);
|
||||
}
|
||||
else {
|
||||
importManager.files[fullPath] = root;
|
||||
|
||||
if (e && !importManager.error) { importManager.error = e; }
|
||||
|
||||
callback(e, root, importedEqualsRoot, fullPath);
|
||||
}
|
||||
};
|
||||
|
||||
var newFileInfo = {
|
||||
|
||||
@@ -1173,7 +1173,7 @@ var Parser = function Parser(context, imports, fileInfo) {
|
||||
},
|
||||
|
||||
importOption: function() {
|
||||
var opt = parserInput.$re(/^(less|css|multiple|once|inline|reference)/);
|
||||
var opt = parserInput.$re(/^(less|css|multiple|once|inline|reference|optional)/);
|
||||
if (opt) {
|
||||
return opt[1];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user