Skip to content
Myr

[svn] fix for misunderstood problem for #217

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 8b8b4b7 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:jinja/translators/python.py+4 added-1 removed
271 unmodified lines
272 # recursive loops273 if node.recursive:274 write('def forloop(seq):')275 self.indention += 1276 write('loopbuffer = []')277 write('write = loopbuffer.append')278 write('context[\'loop\'].push(seq)')279 write('for %s in context[\'loop\']:' %280 self.handle_node(node.item),281 )
20 unmodified lines
302303 # call recursive for loop!304 if node.recursive:305 write('context[\'loop\'].pop()')306 write('return u\'\'.join(buffer)')307 self.indention -= 1308 write('context[\'loop\'] = LoopContext(None, context[\'loop\'], forloop)')306 write('forloop(%s)' % self.handle_node(node.seq))309 write('write(forloop(%s))' % self.handle_node(node.seq))310311 write('context.pop()')312 return '\n'.join(buf)313
444 unmodified lines