Commit 7cfa4b13 by Chris Jerdonek

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

parent f20ecb88
......@@ -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
......
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