diff --git a/lib/less/parser.js b/lib/less/parser.js index 1aad1d94..cb61110c 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -868,9 +868,10 @@ less.Parser = function Parser(env) { } else { while (s = $(this.selector)) { selectors.push(s); + $(this.comment); if (! $(',')) { break } + $(this.comment); } - if (s) $(this.comment); } if (selectors.length > 0 && (rules = $(this.block))) { diff --git a/test/css/comments.css b/test/css/comments.css index e7bfb8db..c7189688 100644 --- a/test/css/comments.css +++ b/test/css/comments.css @@ -44,6 +44,9 @@ color: grey; } */ +.selector, .lots, .comments { + color: grey, /* blue */ orange; +} #last { color: blue; } diff --git a/test/less/comments.less b/test/less/comments.less index aea357f0..102dd684 100644 --- a/test/less/comments.less +++ b/test/less/comments.less @@ -55,5 +55,9 @@ } */ +.selector /* .with */, .lots, /* of */ .comments { + color: grey, /* blue */ orange; +} + #last { color: blue } //