summaryrefslogtreecommitdiff
path: root/jinja2/compiler.py
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2010-03-15 00:26:05 +0100
committerArmin Ronacher <armin.ronacher@active-4.com>2010-03-15 00:26:05 +0100
commit744bb0a3230e759146ed98c463b527ee652d80f0 (patch)
tree6b2483900c2c3abd139622f9a844411cbca4b08b /jinja2/compiler.py
parentd3e6bc41190b79dc8c9d502436c8a226b60e6f5a (diff)
downloadjinja2-744bb0a3230e759146ed98c463b527ee652d80f0.tar.gz
Added another testcase and fixed a bug with the volatile scoping.
--HG-- branch : trunk
Diffstat (limited to 'jinja2/compiler.py')
-rw-r--r--jinja2/compiler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/jinja2/compiler.py b/jinja2/compiler.py
index 5f355a9..3bc6d35 100644
--- a/jinja2/compiler.py
+++ b/jinja2/compiler.py
@@ -1318,6 +1318,7 @@ class CodeGenerator(NodeVisitor):
if frame.eval_ctx.volatile:
self.write('(context.eval_ctx.autoescape and'
' escape or to_string)(')
+ close += 1
elif frame.eval_ctx.autoescape:
self.write('escape(')
close += 1
@@ -1613,7 +1614,7 @@ class CodeGenerator(NodeVisitor):
try:
val = keyword.value.as_const(frame.eval_ctx)
except nodes.Impossible:
- frame.volatile = True
+ frame.eval_ctx.volatile = True
else:
setattr(frame.eval_ctx, keyword.key, val)