AdguardTeam / AdguardTeam/FiltersCompiler

Some valid rules `[$domain=...]` with regex are treated as invalid

Đang mở
#241 0 bình luận 0 reaction 1 người được giao Được @maximtop nhận Xem trên GitHub
Priority: P4
Ngôn ngữ chính
JavaScript
Star
64
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

For example this one:
```adblock
! 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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.