Skip to content

Commit

Permalink
Always skip last token unless anchored (#2187)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjethani authored Aug 25, 2021
1 parent 5963c57 commit 76e51a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/adblocker/src/filters/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ export default class NetworkFilter implements IFilter {
// Get tokens from filter
if (this.isFullRegex() === false) {
if (this.filter !== undefined) {
const skipLastToken = this.isPlain() && !this.isRightAnchor();
const skipLastToken = !this.isRightAnchor();
const skipFirstToken = !this.isLeftAnchor();
tokenizeWithWildcardsInPlace(this.filter, skipFirstToken, skipLastToken, TOKENS_BUFFER);
}
Expand Down

0 comments on commit 76e51a2

Please sign in to comment.