You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At nwsapi.js:1009, the selector above has a regex match with Patterns.logicalsel performed on it, and returns an array of length 5 named match. The contents are the following:
Notice how match[2] is missing a closing parentheses? So it seems the Patterns.logicalsel = /^:(?:(is|where|matches|not|has)(?:\x28\s?([([^\[\]])]|[^()\[\]]|.*)\s?\x29))/i does not correctly match the selector above.
The text was updated successfully, but these errors were encountered:
One is: :is() and :where() takes <forgiving-selector-list>.
Therefore, no error should be thrown for invalid selectors.
Another one is: as @Jikodis pointed out, nesting selectors cannot be expressed correctly using regular expressions, but nwsapi does not take this into account.
To be honest, nwsapi can handle :not(:is(:not(.foo))), but not :not(:is(:not(.foo))):not(.bar).
Both were noted in #28, but that issue was closed without being fixed.
Dependencies:
[email protected]
[email protected]
[email protected]
@testing-library/[email protected]
Our application has the following CSS selector:
nwsapi throws this error message:
Here is the sequence that creates this error:
Notice how match[2] is missing a closing parentheses? So it seems the Patterns.logicalsel = /^:(?:(is|where|matches|not|has)(?:\x28\s?([([^\[\]])]|[^()\[\]]|.*)\s?\x29))/i does not correctly match the selector above.
The text was updated successfully, but these errors were encountered: