Skip to content

Commit 56f4163

Browse files
committed
fix another CSS empty token issue
1 parent c34ad73 commit 56f4163

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/coderay/scanners/css.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ def scan_tokens encoder, options
145145
start = match[/^\w+\(/]
146146
encoder.text_token start, :delimiter
147147
if match[-1] == ?)
148-
encoder.text_token match[start.size..-2], :content
148+
encoder.text_token match[start.size..-2], :content if match.size > start.size + 1
149149
encoder.text_token ')', :delimiter
150150
else
151-
encoder.text_token match[start.size..-1], :content if start.size < match.size
151+
encoder.text_token match[start.size..-1], :content if match.size > start.size
152152
end
153153
encoder.end_group :function
154154

0 commit comments

Comments
 (0)