Skip to content

Commit ebdbcd3

Browse files
committed
Fix quote-stripping in mail gateway again.
Keep non-quoted first line of quoted section only if it ends in ':'.
1 parent 7fe3f1d commit ebdbcd3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roundup/mailgw.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,9 @@ def parseContent(content, keep_citations=None, keep_body=None, config=None):
17921792
if quote_1st or quote_2nd:
17931793
# don't drop non-quoted first line of intermediate section:
17941794
if ns and not quote_1st and lines[0] and not keep_citations:
1795-
l.append(lines[0])
1795+
# we drop only first-lines ending in ':' (e.g. 'XXX wrote:')
1796+
if not lines[0].endswith(':'):
1797+
l.append(lines[0])
17961798
# see if there's a response somewhere inside this section (ie.
17971799
# no blank line between quoted message and response)
17981800
for n, line in enumerate(lines[1:]):

0 commit comments

Comments
 (0)