Commit 906a0961 by Chris Jerdonek

Reordered if block.

parent 06e29078
...@@ -141,14 +141,15 @@ class Parser(object): ...@@ -141,14 +141,15 @@ class Parser(object):
match_index += len(leading_whitespace) match_index += len(leading_whitespace)
leading_whitespace = '' leading_whitespace = ''
if tag_type == '/': if tag_type in ('#', '^'):
start_index, content_end_index, parsed_section = self.parse(template, end_index, tag_key)
elif tag_type == '/':
if tag_key != section_key: if tag_key != section_key:
raise ParsingError("Section end tag mismatch: %s != %s" % (tag_key, section_key)) raise ParsingError("Section end tag mismatch: %s != %s" % (tag_key, section_key))
return end_index, match_index, parsed_template return end_index, match_index, parsed_template
if tag_type in ('#', '^'):
start_index, content_end_index, parsed_section = self.parse(template, end_index, tag_key)
else: else:
start_index = end_index start_index = end_index
# Variable index is now the next character to process. # Variable index is now the next character to process.
......
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