mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Further fix tokenization from regex
As per feedback/discussion: - https://github.com/uBlockOrigin/uBlock-issues/issues/2368 - https://github.com/uBlockOrigin/uBlock-issues/issues/2367
This commit is contained in:
parent
69b899d0f9
commit
f46e5ef3b5
1 changed files with 2 additions and 4 deletions
|
|
@ -3043,12 +3043,10 @@ Parser.utils = Parser.prototype.utils = (( ) => {
|
|||
}
|
||||
case 4: /* T_GROUP, 'Group' */ {
|
||||
if (
|
||||
node.flags.LookAhead === 1 ||
|
||||
node.flags.NegativeLookAhead === 1 ||
|
||||
node.flags.LookBehind === 1 ||
|
||||
node.flags.NegativeLookBehind === 1
|
||||
) {
|
||||
return '';
|
||||
return '\x01';
|
||||
}
|
||||
return this.tokenizableStrFromNode(node.val);
|
||||
}
|
||||
|
|
@ -3156,7 +3154,7 @@ Parser.utils = Parser.prototype.utils = (( ) => {
|
|||
} catch(ex) {
|
||||
}
|
||||
// Process optional sequences
|
||||
const reOptional = /[\x02\x03]+/g;
|
||||
const reOptional = /[\x02\x03]+/;
|
||||
for (;;) {
|
||||
const match = reOptional.exec(s);
|
||||
if ( match === null ) { break; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue