Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The syntax complains about RegEx entries with multiple $'s, despite them being valid. #71

Closed
DandelionSprout opened this issue Apr 14, 2023 · 3 comments
Assignees
Labels
bug Something isn't working Priority: P3 Resolution: Duplicate Status: Closed T: syntax highlighter The issue is related to the syntax highlighting

Comments

@DandelionSprout
Copy link
Member

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.

image

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.

@DandelionSprout
Copy link
Member Author

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.

image

@scripthunter7 scripthunter7 added the bug Something isn't working label Apr 16, 2023
@scripthunter7
Copy link
Member

scripthunter7 commented Apr 16, 2023

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.

@scripthunter7 scripthunter7 added the T: syntax highlighter The issue is related to the syntax highlighting label Nov 8, 2023
@scripthunter7
Copy link
Member

Currently there are several related issues, I have merged them here: #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: P3 Resolution: Duplicate Status: Closed T: syntax highlighter The issue is related to the syntax highlighting
Projects
None yet
Development

No branches or pull requests

4 participants