Handle negative character group

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2373
This commit is contained in:
Raymond Hill 2022-11-18 13:37:48 -05:00
parent 65cde3b75a
commit 4fb4ee1915
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 0 deletions

View File

@ -3027,6 +3027,7 @@ Parser.utils = Parser.prototype.utils = (( ) => {
} }
case 2: /* T_ALTERNATION, 'Alternation' */ case 2: /* T_ALTERNATION, 'Alternation' */
case 8: /* T_CHARGROUP, 'CharacterGroup' */ { case 8: /* T_CHARGROUP, 'CharacterGroup' */ {
if ( node.flags.NegativeMatch ) { return '\x01'; }
let firstChar = 0; let firstChar = 0;
let lastChar = 0; let lastChar = 0;
for ( let i = 0; i < node.val.length; i++ ) { for ( let i = 0; i < node.val.length; i++ ) {