From fd1d0cd51f3bfd79a9752c8f7976db5b9373271f Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 25 Aug 2019 12:54:03 -0700 Subject: [PATCH] Don't add space between neighboring tags where there wasn't any. --- cleanerupper/plugin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cleanerupper/plugin.py b/cleanerupper/plugin.py index d38e400..918f54a 100644 --- a/cleanerupper/plugin.py +++ b/cleanerupper/plugin.py @@ -42,8 +42,14 @@ def remove_unwanted_stylesheets(html): @html_cleaner def merge_neighboring_sametag(html): + html = re.sub(r'', '', html) html = re.sub(r'\s*', ' ', html) + + html = re.sub(r'', '', html) html = re.sub(r'\s*', ' ', html) + + html = re.sub(r'', '', html) + html = re.sub(r'\s*', ' ', html) return html @html_cleaner