diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2012-01-21 04:46:18 -0800 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2012-01-21 04:46:18 -0800 |
commit | 185c4222c4be23cec40b3a91bb8ae481aff398bc (patch) | |
tree | 1a616a30b587f16dde8cff2ca4e981b6e9fde5ce | |
parent | 9c3837e0086ca07f241e9cc74c9fabbeb2d39987 (diff) | |
parent | e099e73ec807898d704177b7c6d246b35d03b1a3 (diff) | |
download | coderay-185c4222c4be23cec40b3a91bb8ae481aff398bc.tar.gz |
Merge pull request #13 from noprompt/master
Highlight CSS functions as :function
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/css.rb | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -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 34eaecb..7b731ef 100644 --- a/lib/coderay/scanners/css.rb +++ b/lib/coderay/scanners/css.rb @@ -144,7 +144,7 @@ module Scanners 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 @@ module Scanners 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 |