katiefenn / parker

Stylesheet analysis tool.
Other
2.47k stars 73 forks source link

Fixed total-id-selector reporting #35

Closed callumacrae closed 9 years ago

callumacrae commented 9 years ago

This fixes two bugs:

It's difficult to write a regular expression for this without negative lookbehind assertions, so I took this approach instead. I'll probably end up fixing more things in this library (such as the specificity calculator, which is still wrong), if many fixes are like this, I'll write a mini state machine thingy.

It's testing some horrible IDs, but I think that's a good assumption for a quality checker to make.

closes #28

callumacrae commented 9 years ago

Did lodash drop support for node 0.8? :confused:

I can't rerun the tests because I'm not a collaborator, but that might fix them.

katiefenn commented 9 years ago

Thank you for adding this. I've been working on an upgrade to the parser to report selectors more accurately, but I've had less time to work on it than expected. This will help me get a publish a bugfix version onto npm soon :-)