aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 75e4a2d..3c97845 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -331,7 +331,9 @@ impl<'a> Generator<'a> {
},
}
self.writeln(" {");
+ self.locals.push();
self.handle(nodes);
+ self.locals.pop();
}
self.handle_ws(ws);
self.writeln("}");
@@ -371,7 +373,11 @@ impl<'a> Generator<'a> {
-> ::askama::Result<()> {{",
name));
self.prepare_ws(ws1);
+
+ self.locals.push();
self.handle(nodes);
+ self.locals.pop();
+
self.flush_ws(ws2);
self.writeln("Ok(())");
self.writeln("}");