Closed DandelionSprout closed 8 months ago
Okay, so it turns out the problem affects pretty much any entry with multiple $'s, for instance /^(https?://)?[a-z]{10,12}\.easy\.co($|/.*$)/
from https://github.com/DandelionSprout/adfilt/blob/master/NorwegianExperimentalList%20alternate%20versions/NordicFiltersABP-Inclusion.txt.
This was originally introduced to detect unnecessary network rule modifiers (dollar signs). This is the reason why it marks them in red, but incorrectly, so it's a bug. However, this check will be taken over by the linter in the future, so the syntax highlighter also gets a refactor soon I think.
Currently there are several related issues, I have merged them here: https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/120
According to GitHub's implementation of the syntax at the time of writing, it struggles with (some/all?) RegEx entries that contain both a
$
in the RegEx and a$
modifier. For instance/^(https?://)?[a-z]{10,12}\.easy\.co($|/.*$)/$document
from Nordic Filters.I'm unsure how to correct the syntax to make it consider such an entry to be valid, but I figured I'd bring it up regardless.