aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2023-01-09 18:22:23 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2023-01-09 18:22:23 -0500
commit12cbf0c26152c9ed2b2443d52f3a9dbe23f4f86c (patch)
tree8dc08e9bbc6ffae19a7e8ebd0e3d8fe1ab778454
parent26e7d3ccd9d5d6f100aa8e0b94882aec3353262f (diff)
downloadb4-12cbf0c26152c9ed2b2443d52f3a9dbe23f4f86c.tar.gz
Don't break on hyphen when wrapping headers
We only want to break on whitespace. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 43597a3..9f37113 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1451,7 +1451,8 @@ class LoreMessage:
# Use simple textwrap
if len(hdata) <= width:
return hdata.encode()
- wrapped = textwrap.wrap(hdata, break_long_words=False, subsequent_indent=' ', width=width)
+ wrapped = textwrap.wrap(hdata, break_long_words=False, break_on_hyphens=False,
+ subsequent_indent=' ', width=width)
return nl.join(wrapped).encode()
qp = f'{hname}: ' + email.quoprimime.header_encode(hval.encode(), charset='utf-8')