Skip to content

Commit

Permalink
Fix SCSS issue with comments.
Browse files Browse the repository at this point in the history
Fixes #272
  • Loading branch information
alecthomas committed Aug 29, 2019
1 parent a5a6d52 commit 2b493e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lexers/s/scss.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ var Scss = internal.Register(MustNewLexer(
{`[\w-]+`, NameTag, nil},
{`#\{`, LiteralStringInterpol, Push("interpolation")},
{`&`, Keyword, nil},
{`[~^*!&\[\]()<>|+=@:;,./?-]`, Operator, nil},
{`[~^*!&\[\]()<>|+=@:,./?-]`, Operator, nil},
{`"`, LiteralStringDouble, Push("string-double")},
{`'`, LiteralStringSingle, Push("string-single")},
{`\n`, Text, nil},
Expand All @@ -92,9 +92,9 @@ var Scss = internal.Register(MustNewLexer(
{`"`, LiteralStringDouble, Pop(1)},
},
"string-single": {
{`(\\.|#(?=[^\n{])|[^\n'#])+`, LiteralStringDouble, nil},
{`(\\.|#(?=[^\n{])|[^\n'#])+`, LiteralStringSingle, nil},
{`#\{`, LiteralStringInterpol, Push("interpolation")},
{`'`, LiteralStringDouble, Pop(1)},
{`'`, LiteralStringSingle, Pop(1)},
},
"string-url": {
{`(\\#|#(?=[^\n{])|[^\n#)])+`, LiteralStringOther, nil},
Expand Down

0 comments on commit 2b493e2

Please sign in to comment.