From 781ff831d74be38e31d1906ff19e15e62254b04b Mon Sep 17 00:00:00 2001 From: Thomas Steinacher Date: Thu, 7 Jun 2018 11:47:01 +0800 Subject: [PATCH] Use existing join lines function to be smart about spaces --- quotequail/_internal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quotequail/_internal.py b/quotequail/_internal.py index f57d1f9..cd7f537 100644 --- a/quotequail/_internal.py +++ b/quotequail/_internal.py @@ -19,7 +19,7 @@ def find_pattern_on_line(lines, n, max_wrap_lines): for typ, regexes in COMPILED_PATTERN_MAP.items(): for regex in regexes: for m in range(max_wrap_lines): - match_line = ' '.join(lines[n:n+1+m]) + match_line = join_wrapped_lines(lines[n:n+1+m]) if match_line.startswith('>'): match_line = match_line[1:].strip() if regex.match(match_line.strip()):