-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[feature] Support multiline regex in text filtering #2857
Comments
it COULD be reworked, but then it would maybe break all existing filters, whats your thoughts on how to handle that? |
Unless I'm missing something it would only break regex filters that have Other option is to match on the whole content only when the |
yes! what i'm thinking.. any downsides? |
Downsides are that you have to supports two versions of text filtering, and that filters that already set |
There's a few tasks to achieve this https://github.com/dgtlmoon/changedetection.io/blob/master/changedetectionio/html_tools.py#L365 supports this " also lots of small references for checking if the content changed or not uses the |
Yes, but it should not be hard to support line mode with multiline regex, you just count the number of new lines up to each match start/end. And since |
It seems that
Trigger/wait for text
,Ignore lines containing
,Block change-detection while text matches
inText filtering
section do not support multiline regex.Narrowed it down to:
changedetection.io/changedetectionio/html_tools.py
Lines 365 to 403 in 5dea5e1
The function iterates over the content line by line and matches each regex to each line:
The function could be reworked to use
re.finditer
/re.findall
on the whole content instead.The text was updated successfully, but these errors were encountered: