summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 56dd751..245a0db 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1215,6 +1215,14 @@ class LoreMessage:
mbody = parts[0].strip('\n')
+ # Fix some more common copypasta trailer wrapping
+ # Fixes: abcd0123 (foo bar
+ # baz quux)
+ mbody = re.sub(r'^(\S+:\s+[0-9a-f]+\s+\([^\)]+)\n([^\n]+\))', r'\1 \2', mbody, flags=re.M)
+ # Signed-off-by: Long Name
+ # <email.here@example.com>
+ mbody = re.sub(r'^(\S+:\s+[^<]+)\n(<[^>]+>)', r'\1 \2', mbody, flags=re.M)
+
# Split into paragraphs
bpara = mbody.split('\n\n')