aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-04-02 21:31:46 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-04-02 21:31:46 +0200
commitc023c35a1a4795ebe7e700823c880566007c4c76 (patch)
tree52180eec30930494422a606ffd455dc9556735e8 /askama_shared
parent0bc388145046750760e6a722629cb78b1e656652 (diff)
downloadaskama-c023c35a1a4795ebe7e700823c880566007c4c76.tar.gz
askama-c023c35a1a4795ebe7e700823c880566007c4c76.tar.bz2
askama-c023c35a1a4795ebe7e700823c880566007c4c76.zip
Fix whitespace handling for include blocks (fixes #69)
Diffstat (limited to 'askama_shared')
-rw-r--r--askama_shared/src/generator.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index 7462af9..bec3437 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -512,7 +512,7 @@ impl<'a> Generator<'a> {
}
fn handle_include(&mut self, state: &'a State, ws: &WS, path: &str) {
- self.prepare_ws(ws);
+ self.flush_ws(ws);
let path = path::find_template_from_path(path, Some(&state.input.path));
let src = path::get_template_source(&path);
let nodes = parser::parse(&src);
@@ -522,7 +522,7 @@ impl<'a> Generator<'a> {
gen.buf
};
self.buf.push_str(&nested);
- self.flush_ws(ws);
+ self.prepare_ws(ws);
}
fn write_let_decl(&mut self, ws: &WS, var: &'a Target) {