mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 09:31:01 +01:00
Set max token length on parser for consistent compilation
Reported internally. The issue could cause the logger
to be unable to successfully reverse-lookup a filter
list for a filter which had tokens longer than 6
characters followed by wildcard.
Regression from:
- 01b1ed9a98
This commit is contained in:
parent
15657a3f1e
commit
7dc962281f
1 changed files with 1 additions and 0 deletions
|
@ -136,6 +136,7 @@ const fromNetFilter = async function(rawFilter) {
|
|||
const µb = µBlock;
|
||||
const writer = new µb.CompiledLineIO.Writer();
|
||||
const parser = new vAPI.StaticFilteringParser();
|
||||
parser.setMaxTokenLength(µb.urlTokenizer.MAX_TOKEN_LENGTH);
|
||||
parser.analyze(rawFilter);
|
||||
|
||||
if ( µb.staticNetFilteringEngine.compile(parser, writer) === false ) {
|
||||
|
|
Loading…
Reference in a new issue