Skip to content
Myr

[svn] fixed SuperBlock bug

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 df7cd97 · Browse files · 1 file+6 added−10 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+6 added−10 removed

  • other:+6 added−10 removed

1 file+6 added−10 removed

modified:jinja/datastructure.py+6 added-10 removed
326 unmodified lines
327 if name in blocks:328 self.stack = blocks[name]329 self.level = level330 else:331 self.stack is None332 if len(stack) > level:333 self.block = stack[level]331 self.stack = None332333 def __call__(self, offset=1):334 if self.stack is not None:336 level = self.level + (offset - 1)337 if level < len(self.stack):338 return self.stack[level](self.context)335 level = self.level + (offset - 1)336 if level < len(self.stack):337 return self.stack[level](self.context)338 raise TemplateRuntimeError('no super block for %r' % self.name)339340 def __repr__(self):342 return '<SuperBlock %r (%spossible)>' % (343 self.name,344 self.stack is None and 'im' or ''345 )341 return '<SuperBlock %r>' % self.name342343344class TokenStream(object):345 """
62 unmodified lines