HamlPy
HamlPy copied to clipboard
Support {% verbatim %} template tag as `- verbatim`
A template that uses the {% verbatim %}
template tag as - verbatim
raises a TemplateSyntaxError: "Unclosed tag 'verbatim'. Looking for one of: endverbatim."
Sample template that fails:
- verbatim
%h1= page_title
Everything works if I wrap the block in non-Haml {% verbatim %}
tags, like so:
{% verbatim %}
%h1= page_title
{% endverbatim %}
Output:
<h1>{{ page_title }}</h1>
It's easy enough to add:
from hamlpy import nodes as hamlpynodes
hamlpynodes.TagNode.self_closing.update(verbatim = endverbatim)
But what about all other 3rd-party tags? - From https://pythonhosted.org/django-templateaddons/template_tags/assign.html for example.