From e96c361da339f5fcff781b750a3bb23b8d2d9134 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sat, 4 Feb 2017 21:40:51 +0100 Subject: Simplify parsing of if-blocks --- askama/src/parser.rs | 3 +-- 1 file changed, 1 insertion(+), 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, Nodes)>, do_parse!( named!(block_if, 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) >> -- cgit