mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
Merge https://github.com/less/less.js into case-insensite-units-2096
Conflicts: test/css/comments.css test/less/comments.less
This commit is contained in:
@@ -1578,6 +1578,7 @@ less.Parser = function Parser(env) {
|
||||
value = this.detachedRuleset();
|
||||
}
|
||||
|
||||
this.comments();
|
||||
if (!value) {
|
||||
// prefer to try to parse first if its a variable or we are compressing
|
||||
// but always fallback on the other one
|
||||
@@ -1822,6 +1823,8 @@ less.Parser = function Parser(env) {
|
||||
break;
|
||||
}
|
||||
|
||||
this.comments();
|
||||
|
||||
if (hasIdentifier) {
|
||||
value = this.entity();
|
||||
if (!value) {
|
||||
@@ -1839,6 +1842,8 @@ less.Parser = function Parser(env) {
|
||||
}
|
||||
}
|
||||
|
||||
this.comments();
|
||||
|
||||
if (hasBlock) {
|
||||
rules = this.blockRuleset();
|
||||
}
|
||||
@@ -2053,9 +2058,20 @@ less.Parser = function Parser(env) {
|
||||
return name.push(a[1]);
|
||||
}
|
||||
}
|
||||
function cutOutBlockComments() {
|
||||
//match block comments
|
||||
var a = /^\s*\/\*(?:[^*]|\*+[^\/*])*\*+\//.exec(c);
|
||||
if (a) {
|
||||
length += a[0].length;
|
||||
c = c.slice(a[0].length);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
match(/^(\*?)/);
|
||||
while (match(/^((?:[\w-]+)|(?:@\{[\w-]+\}))/)); // !
|
||||
while (cutOutBlockComments());
|
||||
if ((name.length > 1) && match(/^\s*((?:\+_|\+)?)\s*:/)) {
|
||||
// at last, we have the complete match now. move forward,
|
||||
// convert name particles to tree objects and return:
|
||||
|
||||
Reference in New Issue
Block a user