From 5f0ff4726ddbd38a895ee29402caabc5b10ad893 Mon Sep 17 00:00:00 2001 From: Bastien Orivel Date: Thu, 24 Aug 2017 19:31:15 +0200 Subject: Allow {% block name %} {% endblock name %} This makes converting an app from tera to askama easier. --- askama_derive/src/parser.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'askama_derive/src') diff --git a/askama_derive/src/parser.rs b/askama_derive/src/parser.rs index 491a5d7..8732f0e 100644 --- a/askama_derive/src/parser.rs +++ b/askama_derive/src/parser.rs @@ -358,6 +358,7 @@ named!(block_block, do_parse!( tag_s!("{%") >> pws2: opt!(tag_s!("-")) >> ws!(tag_s!("endblock")) >> + opt!(ws!(tag_s!(name))) >> nws2: opt!(tag_s!("-")) >> (Node::BlockDef(WS(pws1.is_some(), nws1.is_some()), name, contents, -- cgit