-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Logger always highlights first match #3037
Comments
Closing per #3011 (comment) |
I thinks its best that the logger shows the real match which occurred inside uBO. |
I agree, but are there any other cases besides the prefix1's I reported? If not, then it's a niche consideration like #3011. |
gorhill
added a commit
that referenced
this issue
Jul 11, 2021
Related issue: - #3037 This takes care of the specific case reported. There are other edge cases which are likely not addressed though, i.e. those involving wildcards -- those should be rather rare and at this point I rather leave them unaddressed to not risk regressions (as they are less trivial to address).
I couldn't reproduce with the original URL provided, however I could reproduce and verify the fix using those hand-crafted URL/filter pairs:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first match is almost always the actual match, but sometimes it's not.
I saw it again here with this plain string rule that's word-boundary enforced by default:
(Another case for me is #3011, but that requires the change I made to enforce word-boundary for > 7 char tokens.)
update:
I wrote this addition, which finds the actual match for every case I've come across.
(I've since refined my patch to be a do-while(1) loop with a single null test, still using the exact same regex statements. Functionally, this just saves a few CPU cycles, but it's a nice aesthetic improvement.)
The text was updated successfully, but these errors were encountered: