From 349b3c2612cd99162d12e1cb73d5438d5ca87a09 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 7 Nov 2018 20:51:25 +0100 Subject: Simplify whitespace handling in expression code generation --- askama_derive/src/generator.rs | 4 +--- 1 file changed, 1 insertion(+), 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(")?;"); } } -- cgit