From 32e81c2d93f725b6b810f1ee19c35b47e9bbe687 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sun, 8 Feb 2026 14:13:59 +0000 Subject: [PATCH] Strip extra blank lines from rendered Flickr mail message The Jinja control flow tags in the message template produced extra blank lines at the top, bottom, and middle of the rendered message. Strip the output and filter empty paragraphs so the copied message pastes cleanly. Co-Authored-By: Claude Opus 4.6 --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index e83212e..b84e6f7 100755 --- a/main.py +++ b/main.py @@ -814,7 +814,7 @@ def start() -> str: subject = f"Request to use your photo of {name} on Wikipedia" - lines = msg.split("\n\n") + lines = [line for line in msg.strip().split("\n\n") if line.strip()] return flask.render_template( "combined.html",