optional ; after VariableCall at the end of {} block

i.e. allow `div {@var()}` to become consistent with the rest of CSS/Less syntax
This commit is contained in:
Max Mikhailov
2017-06-01 13:06:58 +03:00
parent 632f96b55d
commit 10db21c3b5
2 changed files with 7 additions and 5 deletions

View File

@@ -687,14 +687,16 @@ var Parser = function Parser(context, imports, fileInfo) {
},
//
// The variable part of a variable definition. Used in the `rule` parser
// Call a variable value
//
// @fink();
// @fink()
//
variableCall: function () {
var name;
if (parserInput.currentChar() === '@' && (name = parserInput.$re(/^(@[\w-]+)\(\s*\)\s*;/))) {
if (parserInput.currentChar() === '@'
&& (name = parserInput.$re(/^(@[\w-]+)\(\s*\)/))
&& parsers.end()) {
return new tree.VariableCall(name[1]);
}
},

View File

@@ -31,8 +31,8 @@
.wrap-mixin(@ruleset);
.desktop-and-old-ie(@rules) {
@media screen and (min-width: 1200) { @rules(); }
html.lt-ie9 & { @rules(); }
@media screen and (min-width: 1200) { @rules() }
html.lt-ie9 & { @rules() }
}
header {