Support regex rules with an end-anchor (`$`)
- Dominant language
- Rust
- Stars
- 2.8k
- Forks
- 250
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 6
Description
Consider the following filter:
```adblock
/^https?:\/\/[a-z]{8,15}\.top\/[a-z]{4,}\.json$/$xhr,3p,match-case
```
There are two `$` characters in the filter. The first represents an anchor to the end of a URL, and the second separates the pattern part of the filter from the options.
`adblock-rust` currently treats the first `$` character as the separator, such that the pattern no longer ends with a `/` character. `match-case` is only supported for regex rules, so the rule is ultimately considered invalid.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue with the filter shown in the report and trace how regex rules locate the options separator. Confirm the existing parse result, then verify that the end-anchor remains part of the pattern and that the rule is accepted with its options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100