diff --git a/changedetectionio/processors/text_json_diff/processor.py b/changedetectionio/processors/text_json_diff/processor.py index 7d08c27d1e7..d8be0967aad 100644 --- a/changedetectionio/processors/text_json_diff/processor.py +++ b/changedetectionio/processors/text_json_diff/processor.py @@ -220,10 +220,10 @@ def run_changedetection(self, watch, skip_when_checksum_same=True): if watch.get('trim_text_whitespace'): - stripped_text_from_html = '\n'.join(line.strip() for line in stripped_text_from_html.splitlines()) + stripped_text_from_html = '\n'.join(line.strip() for line in stripped_text_from_html.replace("\n\n", "\n").splitlines()) if watch.get('remove_duplicate_lines'): - stripped_text_from_html = '\n'.join(dict.fromkeys(line for line in stripped_text_from_html.splitlines())) + stripped_text_from_html = '\n'.join(dict.fromkeys(line.strip() for line in stripped_text_from_html.replace("\n\n", "\n").splitlines())) if watch.get('sort_text_alphabetically'): # Note: Because a
something
will add an extra line feed to signify the paragraph gap diff --git a/changedetectionio/tests/test_unique_lines.py b/changedetectionio/tests/test_unique_lines.py index 65840073586..f4148157210 100644 --- a/changedetectionio/tests/test_unique_lines.py +++ b/changedetectionio/tests/test_unique_lines.py @@ -11,6 +11,8 @@ def set_original_ignore_response():Some initial text
Which is across multiple lines
So let's see what happens.
+ So let's see what happens.
A - sortable line