diff options
-rw-r--r-- | Changes.textile | 1 | ||||
-rw-r--r-- | lib/coderay/scanners/css.rb | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Changes.textile b/Changes.textile index 6c643cc..a3f5ebb 100644 --- a/Changes.textile +++ b/Changes.textile @@ -6,6 +6,7 @@ h2. Changes in 1.1 * Diff scanner: Highlight inline changes in multi-line changes [#99] * Remove double-click toggle handler from HTML table output +* Fixes to CSS scanner (floats, pseudoclasses) * Display line numbers in HTML @:table@ mode even for single-line code (remove special case) [#41, thanks to Ariejan de Vroom] * @CodeRay::TokenKinds@ should not be frozen [#130, thanks to Gavin Kistner] diff --git a/lib/coderay/scanners/css.rb b/lib/coderay/scanners/css.rb index 7b731ef..dd5106e 100644 --- a/lib/coderay/scanners/css.rb +++ b/lib/coderay/scanners/css.rb @@ -27,7 +27,7 @@ module Scanners HexColor = /#(?:#{Hex}{6}|#{Hex}{3})/ Color = /#{HexColor}/ - Num = /-?(?:[0-9]+|[0-9]*\.[0-9]+)/ + Num = /-?(?:[0-9]+(?!\.\d)|[0-9]*\.[0-9]+)/ Name = /#{NMChar}+/ Ident = /-?#{NMStart}#{NMChar}*/ AtKeyword = /@#{Ident}/ @@ -44,7 +44,7 @@ module Scanners Id = /##{Name}/ Class = /\.#{Name}/ - PseudoClass = /:#{Name}/ + PseudoClass = /::?#{Name}/ AttributeSelector = /\[[^\]]*\]?/ end |