From 2ec851d43996244149546111449bf43e1ec9cc22 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 8 Mar 2014 06:30:47 -0500 Subject: Fix the Mako regexes --- coverage/codeunit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coverage/codeunit.py') diff --git a/coverage/codeunit.py b/coverage/codeunit.py index fac43ed..f19a179 100644 --- a/coverage/codeunit.py +++ b/coverage/codeunit.py @@ -218,11 +218,11 @@ class MakoParser(object): self.py_to_html = {} html_linenum = None for linenum, line in enumerate(py_source.splitlines(), start=1): - m_source_line = re.search(r"^\s+# SOURCE LINE (\d+)$", line) + m_source_line = re.search(r"^\s*# SOURCE LINE (\d+)$", line) if m_source_line: html_linenum = int(m_source_line.group(1)) else: - m_boilerplate_line = re.search(r"^\s+# BOILERPLATE ", line) + m_boilerplate_line = re.search(r"^\s*# BOILERPLATE", line) if m_boilerplate_line: html_linenum = None elif html_linenum: -- cgit v1.2.1