aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Decorate.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Handlers/Decorate.py')
-rw-r--r--Mailman/Handlers/Decorate.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py
index 64d569db..81bf7d33 100644
--- a/Mailman/Handlers/Decorate.py
+++ b/Mailman/Handlers/Decorate.py
@@ -227,7 +227,8 @@ def decorate(mlist, template, what, extradict=None):
template = Utils.to_percent(template)
# Interpolate into the template
try:
- text = re.sub(r' *\r?\n', r'\n', template % d)
+ text = re.sub(r'(?m)(?<!^--) +(?=\n)', '',
+ re.sub(r'\r\n', r'\n', template % d))
except (ValueError, TypeError), e:
syslog('error', 'Exception while calculating %s:\n%s', what, e)
what = what.upper()