1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-19 03:05:22 +02:00

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

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)