aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-01-07 21:05:17 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-01-07 21:05:17 +0100
commitfa651a7350d338e9a5d3a52e277c76d288310a63 (patch)
tree0482f3b05fe6adb33013e7df7177daff4f3c1c3f
parent73a048459da99270b3a35672cf64c77db706a226 (diff)
downloadaskama-fa651a7350d338e9a5d3a52e277c76d288310a63.tar.gz
askama-fa651a7350d338e9a5d3a52e277c76d288310a63.tar.bz2
askama-fa651a7350d338e9a5d3a52e277c76d288310a63.zip
Preserve more whitespace while parsing if-blocks
-rw-r--r--askama/src/parser.rs4
1 files 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<Node>, 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))));