chrsan / css-selectors

An implementation of the W3C Selectors Level 3 specification.
Other
114 stars 25 forks source link

:not() selector parser problems #1

Closed afaenger closed 9 years ago

afaenger commented 13 years ago

The parser is to greedy when it comes to :not() selectors, it puts all the previous specifiers of the simple selector into the :not selector, e.g.

"div.class1:not(.class2)" is parsed as "div:not(.class1.class2)" or "div:not(.class1):not(.class2)" turns into "div:not(:not(.class1).class2)"

however, the parser correctly deals with the specifiers after the :not() selector, e.g. "div:not(.class2).class1"

chrsan commented 13 years ago

This is really bad. I'm kind of swamped right now, but if you want to send a patch I'll commit it right away.

chrsan commented 9 years ago

Fixed in version 2.0