Skip to content

Commit 4923696

Browse files
committed
Merge branch 'patch-6' of https://github.com/oyejorge/less.js
2 parents 15af828 + 815741a commit 4923696

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

lib/less/parser.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,17 +1100,20 @@ less.Parser = function Parser(env) {
11001100
if (elements) { elements.push(elem); } else { elements = [ elem ]; }
11011101
c = $char('>');
11021102
}
1103-
if ($char('(')) {
1104-
args = this.args(true).args;
1105-
expectChar(')');
1106-
}
11071103

1108-
if (parsers.important()) {
1109-
important = true;
1110-
}
1104+
if (elements) {
1105+
if ($char('(')) {
1106+
args = this.args(true).args;
1107+
expectChar(')');
1108+
}
11111109

1112-
if (elements && ($char(';') || peekChar('}'))) {
1113-
return new(tree.mixin.Call)(elements, args, index, env.currentFileInfo, important);
1110+
if (parsers.important()) {
1111+
important = true;
1112+
}
1113+
1114+
if (parsers.end()) {
1115+
return new(tree.mixin.Call)(elements, args, index, env.currentFileInfo, important);
1116+
}
11141117
}
11151118

11161119
restore();
@@ -1969,4 +1972,4 @@ less.Parser.serializeVars = function(vars) {
19691972
}
19701973

19711974
return s;
1972-
};
1975+
};

0 commit comments

Comments
 (0)