FiltersCompiler
FiltersCompiler copied to clipboard
Some valid rules `[$domain=...]` with regex are treated as invalid
For example this one:
! Error: "The $domain modifier is not allowed in a domain-specific rule" in the rule: "[$domain=/^i[a-z]*\.strmrdr[a-z0-9]+\..*/]#%#//scriptlet('set-constant', 'adscfg.enabled', 'false')"
[$domain=/^i[a-z]*\.strmrdr[a-z0-9]+\..*/]#%#//scriptlet('set-constant', 'adscfg.enabled', 'false')
https://github.com/AdguardTeam/FiltersRegistry/blob/a51b0d55e87ea3db5e7cbdcabc3c622b7cd83089/filters/filter_13_Turkish/diff.txt
It looks like that it's necessary to escape [ and ] even if it's valid in regexp and should works without escaping.