aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-04 21:40:51 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-04 21:40:51 +0100
commite96c361da339f5fcff781b750a3bb23b8d2d9134 (patch)
tree0a4ca222a1d6b28d97b343d2e7869a48ba205d85
parentc2c1fde503d3fabfd44cc5614d54a589a1f14e90 (diff)
downloadaskama-e96c361da339f5fcff781b750a3bb23b8d2d9134.tar.gz
askama-e96c361da339f5fcff781b750a3bb23b8d2d9134.tar.bz2
askama-e96c361da339f5fcff781b750a3bb23b8d2d9134.zip
Simplify parsing of if-blocks
Diffstat (limited to '')
-rw-r--r--askama/src/parser.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/askama/src/parser.rs b/askama/src/parser.rs
index 3da569e..d0ad809 100644
--- a/askama/src/parser.rs
+++ b/askama/src/parser.rs
@@ -93,8 +93,7 @@ named!(cond_block<(Option<Expr>, Nodes)>, do_parse!(
named!(block_if<Node>, do_parse!(
tag_s!("{%") >>
- ws!(tag_s!("if")) >>
- cond: ws!(expr_any) >>
+ cond: ws!(cond_if) >>
tag_s!("%}") >>
block: parse_template >>
elifs: many0!(cond_block) >>