aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-11-07 20:51:25 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-11-07 21:37:07 +0100
commit349b3c2612cd99162d12e1cb73d5438d5ca87a09 (patch)
treedb016ba14ff68f9717cb2f7da79987756f5f0bdc /askama_derive/src/generator.rs
parent460079e3477367fd8b26b1587673caa8f042e22f (diff)
downloadaskama-349b3c2612cd99162d12e1cb73d5438d5ca87a09.tar.gz
askama-349b3c2612cd99162d12e1cb73d5438d5ca87a09.tar.bz2
askama-349b3c2612cd99162d12e1cb73d5438d5ca87a09.zip
Simplify whitespace handling in expression code generation
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index f309493..f40b094 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -658,10 +658,8 @@ impl<'a> Generator<'a> {
buf.indent();
buf.writeln("writer,");
buf.writeln(&format!("{:#?},", &buf_format.buf));
- buf.start = false;
- buf.write(&buf_expr.buf);
+ buf.write(buf_expr.buf.trim());
buf.dedent();
- buf.start = true;
buf.writeln(")?;");
}
}