From cf1c649f75313b5af1fca9a726d4760920b2f3ac Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sat, 5 May 2012 09:04:14 -0700 Subject: No need to cache the tag_key. --- pystache/parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pystache') diff --git a/pystache/parser.py b/pystache/parser.py index eb2f556..3a014ce 100644 --- a/pystache/parser.py +++ b/pystache/parser.py @@ -146,7 +146,7 @@ class Parser(object): if tag_type in ('#', '^'): # Cache current state. - state = (tag_type, tag_key, end_index, section_key, parsed_template) + state = (tag_type, end_index, section_key, parsed_template) states.append(state) # Initialize new state @@ -160,9 +160,9 @@ class Parser(object): # Restore previous state with newly found section data. parsed_section = parsed_template - (tag_type, tag_key, end_index, section_key, parsed_template) = states.pop() + (tag_type, section_start_index, section_key, parsed_template) = states.pop() node = self._make_section_node(template, tag_type, tag_key, parsed_section, - end_index, match_index) + section_start_index, match_index) else: node = self._make_interpolation_node(tag_type, tag_key, leading_whitespace) -- cgit v1.2.1