aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2008-10-03 14:59:00 -0700
committerMark Sapiro <mark@msapiro.net>2008-10-03 14:59:00 -0700
commit37234c51e4d852f2a830db02885e06404bc9a7df (patch)
tree1c173d67b1021d298b6ce80a308d8b6585f74cb7
parentc7b0eac7de83ed3afd584d733e2b73bf9789701a (diff)
downloadmailman2-37234c51e4d852f2a830db02885e06404bc9a7df.tar.gz
mailman2-37234c51e4d852f2a830db02885e06404bc9a7df.tar.xz
mailman2-37234c51e4d852f2a830db02885e06404bc9a7df.zip
Changed the stripping of trailing spaces from lines of the list headers
and footers to leave a trailing space on a '-- ' signature separator.
-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()