1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-02 17:02:40 +01:00
This commit is contained in:
Raymond Hill 2018-03-07 10:37:18 -05:00
parent 333c6f60fb
commit 081e5b4db9
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1817,14 +1817,14 @@ FilterParser.prototype.parse = function(raw) {
// https://github.com/gorhill/uBlock/issues/3034 // https://github.com/gorhill/uBlock/issues/3034
// - We can remove anchoring if we need to match all at the start. // - We can remove anchoring if we need to match all at the start.
if ( s.startsWith('*') ) { if ( s.startsWith('*') ) {
s = s.replace(/^\*+([^%0-9a-z])/, '$1'); s = s.replace(/^\*+([^%0-9a-z])/i, '$1');
this.anchor &= ~0x6; this.anchor &= ~0x6;
} }
// remove pointless trailing * // remove pointless trailing *
// https://github.com/gorhill/uBlock/issues/3034 // https://github.com/gorhill/uBlock/issues/3034
// - We can remove anchoring if we need to match all at the end. // - We can remove anchoring if we need to match all at the end.
if ( s.endsWith('*') ) { if ( s.endsWith('*') ) {
s = s.replace(/([^%0-9a-z])\*+$/, '$1'); s = s.replace(/([^%0-9a-z])\*+$/i, '$1');
this.anchor &= ~0x1; this.anchor &= ~0x1;
} }