Right now there's minimal regex support in the filters but I'd like to treat any filter starting with a forward slash as a regular expression.
Right now the filters can run ~50k checks in about a second (150 filters on 344 text nodes) so having a large lists of filters isn't going to harm optimization that much, but I would like to avoid having to write two filters for something like subtitles: and subtitles :.
Readability is priority so I while I could turn 20 filters into a single regex I'd rather avoid giant expressions.
For example, the following regex (demo):
... would replace as many as 14 rules at once.
Instead, I would rather smaller, more readable regex that are easier to edit and understand but still cut back on near-duplicate filters.
I'll probably handle this in a few days. There's already regex support so it will be a simple update.
I'll take a look at #12 at the same time and see if I can't close that one too.
Right now there's minimal regex support in the filters but I'd like to treat any filter starting with a forward slash as a regular expression.
Right now the filters can run ~50k checks in about a second (150 filters on 344 text nodes) so having a large lists of filters isn't going to harm optimization that much, but I would like to avoid having to write two filters for something like
subtitles:
andsubtitles :
.Readability is priority so I while I could turn 20 filters into a single regex I'd rather avoid giant expressions.
For example, the following regex (demo):
... would replace as many as 14 rules at once.
Instead, I would rather smaller, more readable regex that are easier to edit and understand but still cut back on near-duplicate filters.
This would shorten the main filter list by at least 30 (~10k checks / 20% faster)