Skip to content

Commit

Permalink
Import inline located inside file imported by reference should not be
Browse files Browse the repository at this point in the history
present in output. Close less#2620
  • Loading branch information
jurcovicovam committed Jul 19, 2015
1 parent 3178103 commit 34e3ea6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/less/tree/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Import.prototype.eval = function (context) {
}
}

if (this.options.inline) {
if (this.options.inline && !this.path.currentFileInfo.reference) {
var contents = new Anonymous(this.root, 0, {filename: this.importedFilename}, true, true);
return this.features ? new Media([contents], this.features.value) : [contents];
} else if (this.css) {
Expand Down
1 change: 1 addition & 0 deletions test/less/import/import-inline-invalid-css.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import (inline) "invalid-css.less";
5 changes: 4 additions & 1 deletion test/less/import/import-reference.less
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@
}
@rules1: {property: value;};
@rules2: {property: value;};
}
}

@import (inline) "invalid-css.less";
@import "import-inline-invalid-css.less";

0 comments on commit 34e3ea6

Please sign in to comment.