Share

Perl CSS Interfaces

Tracker: Bugs

5 CSS::SAC error when underscores in #id_selectors - ID: 1425446
Last Update: Tracker Item Submitted ( renku )

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-\xff0-9-])+
+ (?:(?:\\(?:(?:[a-fA-F0-9]{1,6}[\t\x20])
|[\x32-\xff]))|[a-zA-Z\x80-\xff0-9_-])+
/xs;

It seems to work for me now as intended.


Rene Saarsoo ( renku ) - 2006-02-06 17:47

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.