Fix for Regex lastIndex issue and support for :focus pseudo-class #25

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

jgwhite commented Jan 14, 2012

In certain circumstances, the shared pseudos regex would not
reset its lastIndex back to zero, and end up missing a match.

My fix is an additional pseudos.test(), just to ensure things
are back to zero for the next rule.

Also added in :focus as another potential match.

Finally, removed unecessary var idxs and changed replaceRule
from being defined within the loop to just once, up top.

@jgwhite jgwhite Fix for Regex lastIndex issue and support for :focus pseudo-class
In certain circumstances, the shared `pseudos` regex would not
reset its lastIndex back to zero, and end up missing a match.

My fix is an additional pseudos.test(), just to ensure things
are back to zero for the next rule.

Also added in :focus as another potential match.
38fe138

jgwhite closed this Apr 10, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment