You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while {% block head %} works as expected. I would like to document the naming restrictions if someone knows them or could point me to source code that parses such expressions.
The text was updated successfully, but these errors were encountered:
Thanks for the hint. Skimming through the code i found out that "identifier" is the function that restricts the names to alphabetic characters only (by delegating to https://docs.rs/nom/latest/src/nom/traits.rs.html#246). As identifier is used quite often in https://docs.rs/nom/latest/src/nom/traits.rs.html#246 for many Node types, i wouldn't add a naming hint for blocks only; and i wouldn't want to duplicate the same hint for almost all Node types in the book.
=> The best solution would be to allow the same names as Rust allows (as for top-level variables) if possible. Unfortunately, i don't consider myself knowledgeable enough to implement that. Feel free to close this issue, if there's other more urgent work.
djc
changed the title
Document template inheritence block naming restrictions
Document template inheritance block naming restrictions
Sep 9, 2024
I just stumbled upon an unexpected quirk where apparently hyphens are not allowed in template block names:
results in a vague error like
while
{% block head %}
works as expected. I would like to document the naming restrictions if someone knows them or could point me to source code that parses such expressions.The text was updated successfully, but these errors were encountered: