From fa651a7350d338e9a5d3a52e277c76d288310a63 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sat, 7 Jan 2017 21:05:17 +0100 Subject: Preserve more whitespace while parsing if-blocks --- askama/src/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/askama/src/parser.rs b/askama/src/parser.rs index 38d84d4..48bcf15 100644 --- a/askama/src/parser.rs +++ b/askama/src/parser.rs @@ -63,9 +63,9 @@ named!(block_if, do_parse!( tag_s!("{%") >> ws!(tag_s!("if")) >> cond: ws!(expr_filtered) >> - ws!(tag_s!("%}")) >> + tag_s!("%}") >> block: parse_template >> - ws!(tag_s!("{%")) >> + tag_s!("{%") >> ws!(tag_s!("endif")) >> tag_s!("%}") >> (Node::Cond(cond, block)))); -- cgit