aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-02-01 10:35:29 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-02-01 10:35:29 -0500
commite7823338f0ed84c15c0e28e3ec4479d551a8eca9 (patch)
treead59ffdc43d9bfec8d4f3af35f06d6ce415d3bf4
parentd333fbb3c9abfaf95a6f6ccac3429b67f3510055 (diff)
downloadb4-e7823338f0ed84c15c0e28e3ec4479d551a8eca9.tar.gz
Allow whitespace at the start of non-wrapped trailers
Sometimes folks indent their trailers with whitespace, so relax the rules to recognize this situation. In theory, this shouldn't introduce false-positives. Suggested-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211214214327.4003631-1-robh@kernel.org Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 11c287e..0d506bb 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1397,7 +1397,7 @@ class LoreMessage:
was_trailer = False
for line in body.split('\n'):
line = line.strip('\r')
- matches = re.search(r'^(\w\S+):\s+(\S.*)', line, flags=re.I)
+ matches = re.search(r'^\s*(\w\S+):\s+(\S.*)', line, flags=re.I)
if matches:
groups = list(matches.groups())
# We only accept headers if we haven't seen any non-trailer lines