Bad regexes in the new css.syx

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
User avatar
Posts: 2035
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Bad regexes in the new css.syx

Post by pjj »

According to W3C,
In CSS, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A0 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, two hyphens, or a hyphen followed by a digit.
Regex in the newest (posted in the forums) css.syx doesn't observe this (all IDs above the empty line should be yellow, while none of the IDs below it should be yellow):
old-syx.css.png (3.47 KiB) Viewed 663 times
I have prepared better one (not perfect, but covers most of the basic cases):
new-syx.png (2.82 KiB) Viewed 663 times
It goes like this:

Code: Select all

Could you please update css.syx with the new regexes (for #IDs and .classes)? Thank you!
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
Post Reply