mirror of
https://github.com/less/less.js.git
synced 2026-02-01 02:25:19 -05:00
multi comments in selectors and other places
This commit is contained in:
@@ -577,6 +577,16 @@ less.Parser = function Parser(env) {
|
||||
}
|
||||
},
|
||||
|
||||
comments: function () {
|
||||
var comment, comments = [];
|
||||
|
||||
while(comment = $(this.comment)) {
|
||||
comments.push(comment);
|
||||
}
|
||||
|
||||
return comments;
|
||||
},
|
||||
|
||||
//
|
||||
// Entities are tokens which can be found inside an Expression
|
||||
//
|
||||
@@ -893,7 +903,7 @@ less.Parser = function Parser(env) {
|
||||
if (isCall) {
|
||||
arg = $(this.expression);
|
||||
} else {
|
||||
$(this.comment);
|
||||
$(this.comments);
|
||||
if (input.charAt(i) === '.' && $(/^\.{3}/)) {
|
||||
returner.variadic = true;
|
||||
if ($(";") && !isSemiColonSeperated) {
|
||||
@@ -1023,7 +1033,7 @@ less.Parser = function Parser(env) {
|
||||
restore();
|
||||
}
|
||||
|
||||
$(this.comment);
|
||||
$(this.comments);
|
||||
|
||||
if ($(/^when/)) { // Guard
|
||||
cond = expect(this.conditions, 'expected condition');
|
||||
@@ -1199,9 +1209,9 @@ less.Parser = function Parser(env) {
|
||||
|
||||
while (s = $(this.selector)) {
|
||||
selectors.push(s);
|
||||
$(this.comment);
|
||||
$(this.comments);
|
||||
if (! $(',')) { break }
|
||||
$(this.comment);
|
||||
$(this.comments);
|
||||
}
|
||||
|
||||
if (selectors.length > 0 && (rules = $(this.block))) {
|
||||
|
||||
Reference in New Issue
Block a user