Subject: | error when underscores in #id_selectors |
CSS::SAC error when underscores in #id_selectors
The CSS::SAC parser does not understand, that the #id selectors
can have underscores inside them. So, when you give the following
CSS to the parser:
#foo_bar {font-variant: cursive}
it will give you fatal error:
[fatal] Unknown token in simple selector (line 992) at
/usr/lib/perl5/site_perl/5.8.7/CSS/SAC.pm line 1379.
I changed the line 45 in "SAC.pm", to include the
underscore character:
# matches a name token
$RE_NAME = qr/
- (?:(?:\\(?:(?:[a-fA-F0-9]{1,6}[\t\x20])|[\x32-\xff]))|[a-zA-Z\x80-\xff
0-9-])+
+ (?:(?:\\(?:(?:[a-fA-F0-9]{1,6}[\t\x20])|[\x32-\xff]))|[a-zA-Z\x80-\xff
0-9_-])+
/xs;