AdguardTeam / ExtendedCss

A TypeScript library for non-standard element selecting — :contains(), :matches-css(), etc., and applying CSS styles with extended properties.
GNU General Public License v3.0
65 stars 9 forks source link

Incorrect parsing of styles #57

Closed theseanl closed 6 years ago

theseanl commented 6 years ago

Steps to reproduce:

(new ExtendedCss(':contains(/[\\w]{9,}/) { display:none!important; }')).apply()

Expected:

No error is printed in the console.

Actual:

Extended selector is invalid: /)
Extended selector is invalid: :contains(/[\w]
ameshkov commented 6 years ago

Let's change the interface of ExtendedCss, let it accept a list of selectors instead of the current interface.