diff options
Diffstat (limited to '')
-rw-r--r-- | askama_derive/src/parser.rs | 1 | ||||
-rw-r--r-- | testing/templates/child.html | 2 |
2 files changed, 2 insertions, 1 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, diff --git a/testing/templates/child.html b/testing/templates/child.html index 15e2fc4..d118642 100644 --- a/testing/templates/child.html +++ b/testing/templates/child.html @@ -1,2 +1,2 @@ {% extends "base.html" %} -{% block content %}({{ title }}) Content goes here{% endblock %} +{% block content %}({{ title }}) Content goes here{% endblock content %} |