Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support {% verbatim %} template tag as - verbatim #140

Open
folz opened this issue Jun 25, 2013 · 2 comments
Open

Support {% verbatim %} template tag as - verbatim #140

folz opened this issue Jun 25, 2013 · 2 comments

Comments

@folz
Copy link

folz commented Jun 25, 2013

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>
@Naddiseo
Copy link

Naddiseo commented Jul 3, 2013

It's easy enough to add:

from hamlpy import nodes as hamlpynodes
hamlpynodes.TagNode.self_closing.update(verbatim = endverbatim)

@maxvyaznikov
Copy link

But what about all other 3rd-party tags? - From https://pythonhosted.org/django-templateaddons/template_tags/assign.html for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants