summaryrefslogtreecommitdiff
path: root/coverage/templite.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-09-06 08:14:36 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-09-06 08:14:36 -0400
commitc4f3442a7c5072329543589344b7fa95288f9831 (patch)
treee673125a2ffd5845080e291745c869e7a43a979b /coverage/templite.py
parent2cc824e072170d79b0b7644ac5c9ede6f96a8f94 (diff)
downloadpython-coveragepy-git-c4f3442a7c5072329543589344b7fa95288f9831.tar.gz
Minor templite tweaks.
Diffstat (limited to 'coverage/templite.py')
-rw-r--r--coverage/templite.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/coverage/templite.py b/coverage/templite.py
index fabc3dbb..75fce6d6 100644
--- a/coverage/templite.py
+++ b/coverage/templite.py
@@ -3,6 +3,7 @@
# Started from http://blog.ianbicking.org/templating-via-dict-wrappers.html
# and http://jtauber.com/2006/05/templates.html
# and http://code.activestate.com/recipes/496730/
+# Coincidentally named the same as http://code.activestate.com/recipes/496702/
import re
@@ -68,7 +69,7 @@ class Templite(object):
# Protect actual percent signs in the text.
text = text.replace("%", "%%")
# Convert {{foo}} into %(foo)s
- text = re.sub(r"{{([^}]+)}}", r"%(\1)s", text)
+ text = re.sub(r"{{(.+?)}}", r"%(\1)s", text)
return text
def _loop_prepare(self, match):