Set the marker back to 'm' rather than 't' if it matches the QUOT_PATTERN. Updated test case.
This commit is contained in:
@@ -509,7 +509,10 @@ def _correct_splitlines_in_headers(markers, lines):
|
|||||||
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:
|
else:
|
||||||
m = 't'
|
if QUOT_PATTERN.match(lines[i]):
|
||||||
|
m = 'm'
|
||||||
|
else:
|
||||||
|
m = 't'
|
||||||
|
|
||||||
# If the line is not a header line, set in_header_block false.
|
# If the line is not a header line, set in_header_block false.
|
||||||
if not bool(re.search(RE_HEADER, lines[i])):
|
if not bool(re.search(RE_HEADER, lines[i])):
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user