Commit 7cfa4b13 by Chris Jerdonek

Moved matches['content'] logic outside of _handle_match().

parent f20ecb88
...@@ -327,9 +327,12 @@ class RenderEngine(object): ...@@ -327,9 +327,12 @@ class RenderEngine(object):
break break
matches = match.groupdict() matches = match.groupdict()
match_index = match.end('content') match_index = match.end('content')
end_index = match.end() end_index = match.end()
parse_tree.append(matches['content'])
index = self._handle_match(template, parse_tree, matches, start_index, match_index, end_index) index = self._handle_match(template, parse_tree, matches, start_index, match_index, end_index)
# Save the rest of the template. # Save the rest of the template.
...@@ -345,8 +348,6 @@ class RenderEngine(object): ...@@ -345,8 +348,6 @@ class RenderEngine(object):
elif matches['raw'] is not None: elif matches['raw'] is not None:
matches.update(tag='{', name=matches['raw_name']) matches.update(tag='{', name=matches['raw_name'])
parse_tree.append(matches['content'])
# Standalone (non-interpolation) tags consume the entire line, # Standalone (non-interpolation) tags consume the entire line,
# both leading whitespace and trailing newline. # both leading whitespace and trailing newline.
did_tag_begin_line = match_index == 0 or template[match_index - 1] in END_OF_LINE_CHARACTERS did_tag_begin_line = match_index == 0 or template[match_index - 1] in END_OF_LINE_CHARACTERS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment