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 <noreply@anthropic.com>
This commit is contained in:
parent
29b65e33a7
commit
32e81c2d93
1 changed files with 1 additions and 1 deletions
2
main.py
2
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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue