mirror of https://github.com/gorhill/uBlock.git
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
|
@ -136,6 +136,7 @@ const fromNetFilter = async function(rawFilter) {
|
||||||
const µb = µBlock;
|
const µb = µBlock;
|
||||||
const writer = new µb.CompiledLineIO.Writer();
|
const writer = new µb.CompiledLineIO.Writer();
|
||||||
const parser = new vAPI.StaticFilteringParser();
|
const parser = new vAPI.StaticFilteringParser();
|
||||||
|
parser.setMaxTokenLength(µb.urlTokenizer.MAX_TOKEN_LENGTH);
|
||||||
parser.analyze(rawFilter);
|
parser.analyze(rawFilter);
|
||||||
|
|
||||||
if ( µb.staticNetFilteringEngine.compile(parser, writer) === false ) {
|
if ( µb.staticNetFilteringEngine.compile(parser, writer) === false ) {
|
||||||
|
|
Loading…
Reference in New Issue