mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
Fix comments test
This commit is contained in:
@@ -832,6 +832,7 @@ less.Parser = function Parser(env) {
|
||||
expressions = [];
|
||||
while (arg = $(this.expression)) {
|
||||
nameLoop = null;
|
||||
arg.throwAwayComments();
|
||||
value = arg;
|
||||
|
||||
// Variable
|
||||
@@ -1470,7 +1471,8 @@ less.Parser = function Parser(env) {
|
||||
|
||||
while (e = $(this.addition) || $(this.entity)) {
|
||||
entities.push(e);
|
||||
if (!peek(/^\/\*/) && (delim = $('/'))) {
|
||||
// operations do not allow keyword "/" dimension (e.g. small/20px) so we support that here
|
||||
if (!peek(/^\/[\/*]/) && (delim = $('/'))) {
|
||||
entities.push(new(tree.Anonymous)(delim));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,11 @@ tree.Expression.prototype = {
|
||||
return this.value.map(function (e) {
|
||||
return e.toCSS ? e.toCSS(env) : '';
|
||||
}).join(' ');
|
||||
},
|
||||
throwAwayComments: function () {
|
||||
this.value = this.value.filter(function(v) {
|
||||
return !(v instanceof tree.Comment);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
.selector /* .with */, .lots, /* of */ .comments {
|
||||
color: grey, /* blue */ orange;
|
||||
-webkit-border-radius: 2px /* webkit only */;
|
||||
-moz-border-radius: 2px * 4 /* moz only with operation */;
|
||||
-moz-border-radius: (2px * 4) /* moz only with operation */;
|
||||
}
|
||||
|
||||
.mixin_def_with_colors(@a: white, // in
|
||||
|
||||
Reference in New Issue
Block a user