aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src
diff options
context:
space:
mode:
authorLibravatar Bastien Orivel <eijebong@bananium.fr>2017-08-24 19:31:15 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-24 20:25:35 +0200
commit5f0ff4726ddbd38a895ee29402caabc5b10ad893 (patch)
tree4249db6eea7d35f10331ce72abe1d9924c7b3168 /askama_derive/src
parentc8b14c6d0d61e12c45860c279f648ea6904488c3 (diff)
downloadaskama-5f0ff4726ddbd38a895ee29402caabc5b10ad893.tar.gz
askama-5f0ff4726ddbd38a895ee29402caabc5b10ad893.tar.bz2
askama-5f0ff4726ddbd38a895ee29402caabc5b10ad893.zip
Allow {% block name %} {% endblock name %}
This makes converting an app from tera to askama easier.
Diffstat (limited to 'askama_derive/src')
-rw-r--r--askama_derive/src/parser.rs1
1 files changed, 1 insertions, 0 deletions
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<Node>, 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,