Skip to content

Commit

Permalink
Self-closing dj-block tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamghill committed Nov 11, 2024
1 parent 2c2d6df commit e683fae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dj_angles/mappers/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ def map_block(tag: "Tag") -> str:
# The block tag doesn't actually want/need quoted strings per se, so remove them
name = dequotify(name)

if tag.is_self_closing:
return f"{{% block {name} %}}{{% endblock {name} %}}"

return f"{{% block {name} %}}"


Expand Down

0 comments on commit e683fae

Please sign in to comment.