Fix bad detection of unnecessary trailing `|`

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1916

Regression from:
- 3b7a265ee2
This commit is contained in:
Raymond Hill 2022-01-02 11:13:21 -05:00
parent 1b41bffc2c
commit 6836d2b9ca
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -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)