diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2022-02-01 10:35:29 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2022-02-01 10:37:59 -0500 |
commit | 846c6928b70727e3f8002f1e9c71176d2b824093 (patch) | |
tree | fc499d4dbefe358e704b70a7aa2b02a4831e9d18 | |
parent | fdce5f33b3ea516984771e16c8ac5098beaee512 (diff) | |
download | b4-stable-0.8.y.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__.py | 2 |
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 |