Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #810 Inline comments break with class declarations

  • Loading branch information...
commit 54fbeacbc48d24ba28bbb2da65a95c88697156bb 1 parent b4c438d
Tõnis Tiigi authored
2  lib/lexer.js
View
@@ -797,7 +797,7 @@ Lexer.prototype = {
selector: function() {
var captures;
- if (captures = /^[^{\n,]+/.exec(this.str)) {
+ if (captures = /^.*?(?=\/\/|[,\n{])/.exec(this.str)) {
var selector = captures[0];
this.skip(captures);
return new Token('selector', selector);
6 test/cases/regression.810.css
View
@@ -0,0 +1,6 @@
+a {
+ atr: def;
+}
+a.class {
+ atr: def;
+}
4 test/cases/regression.810.styl
View
@@ -0,0 +1,4 @@
+a // commant
+ atr def
+a.class // comment
+ atr def
Please sign in to comment.
Something went wrong with that request. Please try again.