From 846c6928b70727e3f8002f1e9c71176d2b824093 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Tue, 1 Feb 2022 10:35:29 -0500 Subject: 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 Link: https://lore.kernel.org/r/20211214214327.4003631-1-robh@kernel.org Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3