summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index e61958a..df6fa23 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -594,7 +594,7 @@ class LoreMessage:
# Do we have something that looks like a person-trailer?
matches = re.findall(r'^\s*([\w-]+):[ \t]+(.*<\S+>)\s*$', self.body, re.MULTILINE)
# These are commonly part of patch/commit metadata
- badtrailers = ('from', 'author')
+ badtrailers = ('from', 'author', 'email')
if matches:
for tname, tvalue in matches:
if tname.lower() not in badtrailers:
@@ -683,8 +683,7 @@ class LoreMessage:
@staticmethod
def clean_header(hdrval):
- uval = hdrval.replace('\n', ' ')
- new_hdrval = re.sub(r'\s+', ' ', uval)
+ new_hdrval = re.sub(r'\n?\s+', ' ', str(hdrval))
return new_hdrval.strip()
@staticmethod