diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-09-06 08:14:36 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-09-06 08:14:36 -0400 |
commit | 741c026ab3275cd557673c206dd2aef522ad4482 (patch) | |
tree | 0b42dac345682457b70158e9923c7a0ec1c20279 /coverage/templite.py | |
parent | 9027de8d67706c203f0ab20df75acfa3db7ae704 (diff) | |
download | python-coveragepy-741c026ab3275cd557673c206dd2aef522ad4482.tar.gz |
Minor templite tweaks.
Diffstat (limited to 'coverage/templite.py')
-rw-r--r-- | coverage/templite.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coverage/templite.py b/coverage/templite.py index fabc3db..75fce6d 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): |