Commit 7eef0a68 by Chris Jerdonek

Avoid adding spurious empty strings to the parse tree.

parent 28234854
......@@ -113,7 +113,8 @@ class Parser(object):
match_index = match.start()
end_index = match.end()
# Add string contents before the tag.
# Avoid adding spurious empty strings to the parse tree.
if start_index != match_index:
parsed_template.add(template[start_index:match_index])
matches = match.groupdict()
......
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