From ad9c2ca0e8f40f8a955a6fddb46643ba6092f00d Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Wed, 13 Jul 2016 00:08:39 +0500 Subject: [PATCH] Upgrade quotations.py --- talon/quotations.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/talon/quotations.py b/talon/quotations.py index b294de5..9d2a8d4 100644 --- a/talon/quotations.py +++ b/talon/quotations.py @@ -193,7 +193,7 @@ def mark_message_lines(lines): >>> mark_message_lines(['answer', 'From: foo@bar.com', '', '> question']) 'tsem' """ - markers = bytearray(len(lines)) + markers = ['e' for _ in lines] i = 0 while i < len(lines): if not lines[i].strip(): @@ -219,7 +219,7 @@ def mark_message_lines(lines): markers[i] = 't' i += 1 - return markers + return ''.join(markers) def process_marked_lines(lines, markers, return_flags=[False, -1, -1]): @@ -233,6 +233,7 @@ def process_marked_lines(lines, markers, return_flags=[False, -1, -1]): return_flags = [were_lines_deleted, first_deleted_line, last_deleted_line] """ + markers = ''.join(markers) # if there are no splitter there should be no markers if 's' not in markers and not re.search('(me*){3}', markers): markers = markers.replace('m', 't')