Skip to content

Fix minor issue with CSS scanner #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 21, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ test/scanners
bench/test.div.html
diff.html
etc/CodeRay.tmproj
*.swp
4 changes: 2 additions & 2 deletions lib/coderay/scanners/css.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def scan_tokens encoder, options
encoder.end_group :string

elsif match = scan(/#{RE::Function}/o)
encoder.begin_group :string
encoder.begin_group :function
start = match[/^\w+\(/]
encoder.text_token start, :delimiter
if match[-1] == ?)
Expand All @@ -153,7 +153,7 @@ def scan_tokens encoder, options
else
encoder.text_token match[start.size..-1], :content
end
encoder.end_group :string
encoder.end_group :function

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