Closed petrometro closed 8 years ago
Using only word boundaries surrounding the className, we get false positives. Eg. for a node with class 'not-active', findNode('.not-active') returns true but findNode('active') returns true as well.
Good catch,
This will need to be "(^|\\s)" + cls + "(\\s|$)" to pass existing tests - and could you add a test case which covers this bug too please?
"(^|\\s)" + cls + "(\\s|$)"
I finished this off and released it as 0.13.1
0.13.1
Using only word boundaries surrounding the className, we get false positives. Eg. for a node with class 'not-active', findNode('.not-active') returns true but findNode('active') returns true as well.