File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class SassCommon < RegexLexer
6767 rule ( id ) do |m |
6868 if CSS . builtins . include? m [ 0 ]
6969 token Name ::Builtin
70- elsif CSS . constants . include? m [ 0 ]
70+ elsif CSS . colors . include? m [ 0 ]
7171 token Name ::Constant
7272 else
7373 token Name
Original file line number Diff line number Diff line change 1+ describe Rouge ::Lexers ::Sass do
2+ let ( :subject ) { Rouge ::Lexers ::Sass . new }
3+
4+ describe 'guessing' do
5+ include Support ::Guessing
6+
7+ it 'guesses by filename' do
8+ assert_guess :filename => 'foo.sass'
9+ end
10+ end
11+
12+ describe 'lexing' do
13+ include Support ::Lexing
14+ it 'lexes colors' do
15+ assert_tokens_equal (
16+ '$foo: aliceblue' ,
17+ [ 'Name.Variable' , '$foo' ] ,
18+ [ 'Punctuation' , ':' ] ,
19+ [ 'Text' , ' ' ] ,
20+ [ 'Name.Constant' , 'aliceblue' ] ,
21+ )
22+ end
23+ end
24+
25+ end
You can’t perform that action at this time.
0 commit comments