From ca60a1b02c177e32e1704869935833c60adad1bb Mon Sep 17 00:00:00 2001 From: "Matthias@Dell" Date: Sun, 19 Nov 2023 20:12:15 +0100 Subject: [PATCH] add remove blanks in output --- html-preprocessor | 2 ++ 1 file changed, 2 insertions(+) diff --git a/html-preprocessor b/html-preprocessor index faf8412..effaa32 100755 --- a/html-preprocessor +++ b/html-preprocessor @@ -660,6 +660,8 @@ if __name__ == "__main__": target_html = file.read() output_html = parse_file(target_html, variables, not args.preserve_comments) + # remove empty lines + output_html = re.sub(r"[\t\r ]*\n(?:[\t\r ]*\n[\t\r ]*)+", r"\n", output_html) # pdebug(f"Output: {output_html}")