Module: CodeRay::Scanners::CSS::RE
- Defined in:
- lib/coderay/scanners/css.rb
Overview
:nodoc:
Constant Summary collapse
- Hex =
:nodoc:
/[0-9a-fA-F]/- Unicode =
differs from standard because it allows uppercase hex too
/\\#{Hex}{1,6}(?:\r\n|\s)?/- Escape =
/#{Unicode}|\\[^\r\n\f0-9a-fA-F]/- NMChar =
/[-_a-zA-Z0-9]|#{Escape}/- NMStart =
/[_a-zA-Z]|#{Escape}/- NL =
/\r\n|\r|\n|\f/- String1 =
TODO: buggy regexp
/"(?:[^\n\r\f\\"]|\\#{NL}|#{Escape})*"?/- String2 =
TODO: buggy regexp
/'(?:[^\n\r\f\\']|\\#{NL}|#{Escape})*'?/- String =
/#{String1}|#{String2}/- HexColor =
/#(?:#{Hex}{6}|#{Hex}{3})/- Color =
/#{HexColor}/- Num =
/-?(?:[0-9]+|[0-9]*\.[0-9]+)/- Name =
/#{NMChar}+/- Ident =
/-?#{NMStart}#{NMChar}*/- AtKeyword =
/@#{Ident}/- Percentage =
/#{Num}%/- Unit =
Regexp.union(*(reldimensions + absdimensions + %w[s]))
- Dimension =
/#{Num}#{Unit}/- Comment =
%r! /\* (?: .*? \*/ | .* ) !mx- Function =
/(?:url|alpha|attr|counters?)\((?:[^)\n\r\f]|\\\))*\)?/- Id =
/##{Name}/- Class =
/\.#{Name}/- PseudoClass =
/:#{Name}/- AttributeSelector =
/\[[^\]]*\]?/