-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add matchDebug() for Cliqz #2162
Conversation
cbcfff5
to
ec7ea79
Compare
Sorry I just noticed #2160. I have made this only for Cliqz now. |
url, | ||
sourceUrl: frameUrl, | ||
type, | ||
})).filter || null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default the original filter might not be kept around (but the engine will try to recreate it from internal state. If we know we are in debug mode we can specify it to the FiltersEngine.parse
method above:
static parse(rawLists, enableCompression, debug) {
return new Cliqz(FiltersEngine.parse(rawLists, {
enableCompression,
integrityCheck: false,
loadCosmeticFilters: false,
debug: debug === true,
}));
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
url, | ||
sourceUrl: frameUrl, | ||
type, | ||
})).filter || null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think filter
will be an object and not sure if the toString()
will be called implicitly somewhere? If not:
})).filter || null; | |
})).filter?.toString() || null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I'm returning the value of rawLine
or null
.
ec7ea79
to
bf3c8f0
Compare
bf3c8f0
to
0737917
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
This patch adds a
matchDebug()
implementation for Cliqz.