Set the marker back to 'm' rather than 't' if it matches the QUOT_PATTERN. Updated test case.

This commit is contained in:
smitcona
2017-02-01 18:28:19 +00:00
parent a403ecb5c9
commit 984c036b6e
2 changed files with 5 additions and 2 deletions

View File

@@ -508,6 +508,9 @@ def _correct_splitlines_in_headers(markers, lines):
if not in_header_block: if not in_header_block:
if bool(re.search(RE_HEADER, lines[i])): if bool(re.search(RE_HEADER, lines[i])):
in_header_block = True in_header_block = True
else:
if QUOT_PATTERN.match(lines[i]):
m = 'm'
else: else:
m = 't' m = 't'

View File

@@ -730,6 +730,6 @@ Hey!
> > Subject: Test > > Subject: Test
> > Hi > > Hi
""" """
expected_markers = "stttttsttttetesttesmtmmmmsmtmm" expected_markers = "stttttsttttetesttesmmmmmmsmmmm"
markers = quotations.split_emails(msg) markers = quotations.split_emails(msg)
eq_(markers, expected_markers) eq_(markers, expected_markers)