1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

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

View File

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