Skip to content

Commit

Permalink
Handle negative character group
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Nov 18, 2022
1 parent 65cde3b commit 4fb4ee1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/static-filtering-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++ ) {
Expand Down

0 comments on commit 4fb4ee1

Please sign in to comment.