From fa9177b417389503be6d5bed6495cd38ea7b48b6 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Tue, 25 Mar 2025 13:30:08 -0400 Subject: [PATCH] AutoYADM commit: 2025-03-25 13:30:08 --- .config/mail/format.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/mail/format.py b/.config/mail/format.py index d3b0a08c..f557b113 100755 --- a/.config/mail/format.py +++ b/.config/mail/format.py @@ -36,6 +36,7 @@ for line in sys.stdin: skipping = True print(line, end = "") elif not line.rstrip(): + # Empty line in_par = not in_par print() # print(line, end="") @@ -45,17 +46,20 @@ for line in sys.stdin: for next_line in sys.stdin: # if not line.startswith((">", "```", "--")): stripped = next_line.rstrip() + print("runs") if stripped: + print("runs") par.append(stripped) else: in_par = False + par.append("\n") break line = " ".join(par) + print(par) # empty line, treat next section as paragraph # TODO: fix signature being mangled and newlines erased if not skipping: wrapped = textwrap.wrap(line, width=74, break_long_words=False, replace_whitespace=True) - print("\n".join(wrapped)) else: print(line, end = "")