Commit 021ab20a by Chris Jerdonek

Renamed index to start_index.

parent cb8c06ca
...@@ -154,7 +154,7 @@ class Template(object): ...@@ -154,7 +154,7 @@ class Template(object):
return parse_tree return parse_tree
def _handle_match(self, template, match, buffer, index): def _handle_match(self, template, match, buffer, start_index):
# Normalize the captures dictionary. # Normalize the captures dictionary.
captures = match.groupdict() captures = match.groupdict()
if captures['change'] is not None: if captures['change'] is not None:
...@@ -202,7 +202,7 @@ class Template(object): ...@@ -202,7 +202,7 @@ class Template(object):
tag = { '#': sectionTag, '^': inverseTag }[captures['tag']] tag = { '#': sectionTag, '^': inverseTag }[captures['tag']]
buffer.append(tag(name, bufr, tmpl, (self.otag, self.ctag))) buffer.append(tag(name, bufr, tmpl, (self.otag, self.ctag)))
elif captures['tag'] == '/': elif captures['tag'] == '/':
raise EndOfSection(buffer, template[index:tagPos], pos) raise EndOfSection(buffer, template[start_index:tagPos], pos)
elif captures['tag'] in ['{', '&']: elif captures['tag'] in ['{', '&']:
buffer.append(unescapedTag(name, (self.otag, self.ctag))) buffer.append(unescapedTag(name, (self.otag, self.ctag)))
elif captures['tag'] == '': elif captures['tag'] == '':
......
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