Add Django template syntax compatibility
See original GitHub issueThe mustache support is a really nice feature. It would be great if the HTML beautifier also understood (and indented where required) Django template syntax.
Given the following:
{% extends "foo.html" %}{% block bar %}
{% for in zulu %}<li><a>zulu</a></li>{% endfor %}
{% endblock %}
I would expect the output to be:
{% extends "foo.html" %}
{% block bar %}
{% for in zulu %}
<li>
<a>zulu</a>
</li>
{% endfor %}
{% endblock %}
Issue Analytics
- State:
- Created 9 years ago
- Reactions:9
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Built-in template tags and filters
Filters the contents of the block through one or more filters. Multiple filters can be specified with pipes and filters can have arguments,...
Read more >Django Templates
A Django template is a text document or a Python string marked-up using the Django template language. Some constructs are recognized and ...
Read more >Django template language how to fix
In your settings.py file, in the TEMPLATES-section, APP_DIRS is true, so you should create a directory 'stack' under your 'templates' directory ...
Read more >How to use extends from Django template tags
A Django template is a text document, like HTML, that adds jinja syntax. The syntax of the Django template language involves four constructs, ......
Read more >Django Tutorial Part 5: Creating our home page
In addition to template tags, the template syntax allows you to reference variables that are passed into the template from the view, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Django and related languages do not indent yet, but they are now supported in that they are not killed by beautification.
@AdrienLemaire @antnieszka @jkevingutierrez PRs welcome. If you look at what is don’t for mustache and build around it, it should be possible.