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:
jurcovicovam
2014-09-05 10:08:54 +02:00
14 changed files with 17914 additions and 11 deletions

View File

@@ -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: