Permalink
Browse files

better comment parsing in selector list

  • Loading branch information...
cloudhead committed Mar 24, 2011
1 parent d444d1b commit f5ffdde7104f4b025faacde80c3766e39592c7a7
Showing with 9 additions and 1 deletion.
  1. +2 −1 lib/less/parser.js
  2. +3 −0 test/css/comments.css
  3. +4 −0 test/less/comments.less
View
@@ -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))) {
View
@@ -44,6 +44,9 @@
color: grey;
}
*/
+.selector, .lots, .comments {
+ color: grey, /* blue */ orange;
+}
#last {
color: blue;
}
View
@@ -55,5 +55,9 @@
}
*/
+.selector /* .with */, .lots, /* of */ .comments {
+ color: grey, /* blue */ orange;
+}
+
#last { color: blue }
//

0 comments on commit f5ffdde

Please sign in to comment.