Skip to content

Fix finding modifier index start - #110

Merged
seia-soto merged 11 commits into
mainfrom
fix-modifier-index-start
Jan 13, 2026
Merged

seia-soto merged 11 commits into
mainfrom
fix-modifier-index-start

Conversation

@seia-soto

Copy link
Copy Markdown
Member

Using String.prototype.indexOf is not suitable for adblocker filter list syntax since the regex filter may container the $ char. This pull request replaces the function call with a regex based search.

Using `String.prototype.indexOf` is not suitable for adblocker filter list syntax since the regex filter may container the `$` char. This pull request replaces the function call with a regex based search.
@seia-soto
seia-soto requested a review from chrmod December 22, 2025 21:39
@seia-soto seia-soto self-assigned this Dec 22, 2025
@seia-soto seia-soto added the PR: Bug Fix 🐛 Increment patch version when merged label Dec 22, 2025
@seia-soto seia-soto changed the title Fix modifier index start Fix finding modifier index start Dec 22, 2025
Comment thread package.json Resolved
@seia-soto

Copy link
Copy Markdown
Member Author

Waiting #111

@github-actions

Copy link
Copy Markdown

🚀 Preview deployment is ready!

You can view the changes at: https://ghostery.github.io/urlfilter2dnr/preview/pr-110/index.html

Comment thread src/converters/helpers.ts Resolved
Comment thread test/unit/helpers.ts Outdated
// @eyeo/webext-ad-filtering-solution is lowercasing the regex metacharacters;
// the condition below makes the tests pass by lowecasing the full regex from AdGuard
// refs https://gitlab.com/eyeo/browser-extensions-and-premium/extensions/extensions/-/issues/12
.toLowerCase()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of this, shouldn't we have explicit tests for this behavior ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not to test but to make the test pass. I just added a test that describes the specific behaviour as well.

@github-actions

Copy link
Copy Markdown

🚀 Preview deployment is ready!

You can view the changes at: https://ghostery.github.io/urlfilter2dnr/preview/pr-110/index.html

@github-actions

Copy link
Copy Markdown

🚀 Preview deployment is ready!

You can view the changes at: https://ghostery.github.io/urlfilter2dnr/preview/pr-110/index.html

@github-actions

Copy link
Copy Markdown

🚀 Preview deployment is ready!

You can view the changes at: https://ghostery.github.io/urlfilter2dnr/preview/pr-110/index.html

@seia-soto
seia-soto requested a review from chrmod December 30, 2025 23:36
@github-actions

Copy link
Copy Markdown

🚀 Preview deployment is ready!

You can view the changes at: https://ghostery.github.io/urlfilter2dnr/preview/pr-110/index.html

@seia-soto
seia-soto merged commit e5830e7 into main Jan 13, 2026
2 checks passed
@seia-soto
seia-soto deleted the fix-modifier-index-start branch January 13, 2026 06:45
@seia-soto seia-soto mentioned this pull request Jan 13, 2026
1 task done
seia-soto added a commit to ghostery/ghostery-extension that referenced this pull request Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 Increment patch version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants