From 1ebdcaf3bb15cac1e1554b5b380fd9e6e7359ed8 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 20 Apr 2009 08:07:42 -0400 Subject: Muliple loops and multi-line loops didn't work. --- coverage/templite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/templite.py') diff --git a/coverage/templite.py b/coverage/templite.py index ec845076..2eab864a 100644 --- a/coverage/templite.py +++ b/coverage/templite.py @@ -40,7 +40,7 @@ class Templite(object): """Convert Django-style data references into Python-native ones.""" # Pull out loops. text = re.sub( - r"{% for ([a-z0-9_]+) in ([a-z0-9_.|]+) %}(.*){% endfor %}", + r"(?s){% for ([a-z0-9_]+) in ([a-z0-9_.|]+) %}(.*?){% endfor %}", self._loop_repl, text ) # Protect actual percent signs in the text. -- cgit v1.2.1