mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
fix #3581
This commit is contained in:
parent
333c6f60fb
commit
081e5b4db9
1 changed files with 2 additions and 2 deletions
|
@ -1817,14 +1817,14 @@ FilterParser.prototype.parse = function(raw) {
|
|||
// https://github.com/gorhill/uBlock/issues/3034
|
||||
// - We can remove anchoring if we need to match all at the start.
|
||||
if ( s.startsWith('*') ) {
|
||||
s = s.replace(/^\*+([^%0-9a-z])/, '$1');
|
||||
s = s.replace(/^\*+([^%0-9a-z])/i, '$1');
|
||||
this.anchor &= ~0x6;
|
||||
}
|
||||
// remove pointless trailing *
|
||||
// https://github.com/gorhill/uBlock/issues/3034
|
||||
// - We can remove anchoring if we need to match all at the end.
|
||||
if ( s.endsWith('*') ) {
|
||||
s = s.replace(/([^%0-9a-z])\*+$/, '$1');
|
||||
s = s.replace(/([^%0-9a-z])\*+$/i, '$1');
|
||||
this.anchor &= ~0x1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue