Skip to content

Commit 185c422

Browse files
committed
Merge pull request #13 from noprompt/master
Highlight CSS functions as :function
2 parents 9c3837e + e099e73 commit 185c422

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ test/scanners
2020
bench/test.div.html
2121
diff.html
2222
etc/CodeRay.tmproj
23+
*.swp

lib/coderay/scanners/css.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def scan_tokens encoder, options
144144
encoder.end_group :string
145145

146146
elsif match = scan(/#{RE::Function}/o)
147-
encoder.begin_group :string
147+
encoder.begin_group :function
148148
start = match[/^\w+\(/]
149149
encoder.text_token start, :delimiter
150150
if match[-1] == ?)
@@ -153,7 +153,7 @@ def scan_tokens encoder, options
153153
else
154154
encoder.text_token match[start.size..-1], :content
155155
end
156-
encoder.end_group :string
156+
encoder.end_group :function
157157

158158
elsif match = scan(/(?: #{RE::Dimension} | #{RE::Percentage} | #{RE::Num} )/ox)
159159
encoder.text_token match, :float

0 commit comments

Comments
 (0)