aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
authorLibravatar Pavel Fokin <fokinpv@gmail.com>2019-04-11 07:48:38 +0300
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2019-04-18 09:38:39 +0200
commite29792e90ce438875a13becdeb9c030b1d3132e4 (patch)
tree769e7a997231beeac0af279dd985a54b209498ae /askama_derive/src/generator.rs
parent3825a2bb5ac6f1ad08b6b5d796d4271e4a38761e (diff)
downloadaskama-e29792e90ce438875a13becdeb9c030b1d3132e4.tar.gz
askama-e29792e90ce438875a13becdeb9c030b1d3132e4.tar.bz2
askama-e29792e90ce438875a13becdeb9c030b1d3132e4.zip
WIP: Add raw block
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 4a6eb89..aa91de0 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -345,6 +345,11 @@ impl<'a> Generator<'a> {
self.flush_ws(m.ws1);
self.prepare_ws(m.ws2);
}
+ Node::Raw(ws1, contents, ws2) => {
+ self.handle_ws(ws1);
+ self.buf_writable.push(Writable::Lit(contents));
+ self.handle_ws(ws2);
+ }
Node::Import(ws, _, _) => {
if level != AstLevel::Top {
panic!("import blocks only allowed at the top level");