Commit 4ececd60 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Keep signature delimiters intact in notifications

Since commit eeaa1c3a

 (Separate text from footer in notification emails,
2020-01-04), information about unsubscribing from notifications is added
in a signature block. However, the code to format the email body trimmed
the RFC 3676 signature delimiter, replacing "-- " by "--". Fix this by
adding a special case for signature delimiters.
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent daee20c6
......@@ -54,6 +54,9 @@ class Notification:
def get_body_fmt(self, lang):
body = ''
for line in self.get_body(lang).splitlines():
if line == '-- ':
body += '-- \n'
continue
body += textwrap.fill(line, break_long_words=False) + '\n'
for i, ref in enumerate(self.get_refs()):
body += '\n' + '[%d] %s' % (i + 1, ref)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment