diff --git a/.gitignore b/.gitignore index 80d9aa1f..2bb93859 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ test/scanners bench/test.div.html diff.html etc/CodeRay.tmproj +*.swp diff --git a/lib/coderay/scanners/css.rb b/lib/coderay/scanners/css.rb index 34eaecb6..7b731efc 100644 --- a/lib/coderay/scanners/css.rb +++ b/lib/coderay/scanners/css.rb @@ -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] == ?) @@ -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