summaryrefslogtreecommitdiff
path: root/pystache/renderengine.py
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-01-13 21:10:50 -0800
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-01-18 13:26:20 -0800
commit7cfa4b13cc1809ac45527bf5cfd9680c109d78e6 (patch)
tree1c8cd648b433761d7e7b36627416eef497baa06a /pystache/renderengine.py
parentf20ecb88e5f46bf055950efa9355179eb467f704 (diff)
downloadpystache-7cfa4b13cc1809ac45527bf5cfd9680c109d78e6.tar.gz
Moved matches['content'] logic outside of _handle_match().
Diffstat (limited to 'pystache/renderengine.py')
-rw-r--r--pystache/renderengine.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pystache/renderengine.py b/pystache/renderengine.py
index 4f2420c..5869edc 100644
--- a/pystache/renderengine.py
+++ b/pystache/renderengine.py
@@ -327,9 +327,12 @@ class RenderEngine(object):
break
matches = match.groupdict()
+
match_index = match.end('content')
end_index = match.end()
+ parse_tree.append(matches['content'])
+
index = self._handle_match(template, parse_tree, matches, start_index, match_index, end_index)
# Save the rest of the template.
@@ -345,8 +348,6 @@ class RenderEngine(object):
elif matches['raw'] is not None:
matches.update(tag='{', name=matches['raw_name'])
- parse_tree.append(matches['content'])
-
# Standalone (non-interpolation) tags consume the entire line,
# both leading whitespace and trailing newline.
did_tag_begin_line = match_index == 0 or template[match_index - 1] in END_OF_LINE_CHARACTERS