Skip to content
Myr

fixed #281 and added test case

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 92d414a · Browse files · 2 files+8 added−2 removed
This commit

State

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

Diff stats

2 files+8 added−2 removed

  • tests:+5 added−0 removed
  • other:+3 added−2 removed

2 files+8 added−2 removed

modified:jinja/parser.py+3 added-2 removed
307 unmodified lines
308 self.blocks.add(name)309310 if self.stream.current.type != 'block_end':311 lineno = self.stream.lineno312 body = nodes.NodeList([self.parse_variable_tag()], lineno,313 self.filename)312 expr = self.parse_tuple_expression()313 node = nodes.Print(expr, lineno, self.filename)314 body = nodes.NodeList([node], lineno, self.filename)315 self.stream.expect('block_end')316 else:317 # otherwise parse the body and attach it to the block318 self.stream.expect('block_end')
857 unmodified lines
modified:tests/test_inheritance.py+5 added
109 unmodified lines
110111112def test_working(env):113 tmpl = env.get_template('working')114115116def test_shortcut(env):117 tmpl = env.from_string('{% block foo "42" %}')118 assert tmpl.render() == '42'