From 6836d2b9ca62b1532ce1d98d70df69ee08efffab Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 2 Jan 2022 11:13:21 -0500 Subject: [PATCH] Fix bad detection of unnecessary trailing `|` Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/discussions/1916 Regression from: - https://github.com/gorhill/uBlock/commit/3b7a265ee274f82eb70e23195cbda2b510bb3476 --- src/js/static-filtering-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index c9e9f3c87..f6bb5b976 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -658,7 +658,7 @@ const Parser = class { // https://github.com/gorhill/uBlock/issues/3034 // We can remove anchoring if we need to match all at the end. if ( hasBits(this.flavorBits, BITFlavorNetRightAnchor) ) { - const i = this.patternLeftAnchorSpan; + const i = this.patternRightAnchorSpan.i; if ( this.patternSpan.len === 0 || hasBits(this.slices[i-3], BITIgnore|BITAsterisk)