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:37:59 -0500
commit846c6928b70727e3f8002f1e9c71176d2b824093 (patch)
treefc499d4dbefe358e704b70a7aa2b02a4831e9d18
parentfdce5f33b3ea516984771e16c8ac5098beaee512 (diff)
downloadb4-846c6928b70727e3f8002f1e9c71176d2b824093.tar.gz
Allow whitespace at the start of non-wrapped trailersstable-0.8.y
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 40f4dc4..27e914c 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1392,7 +1392,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