Open
Description
Is your proposal related to a problem?
Yes
Describe the solution you’d like
I would like to indent inside template tags
Describe alternatives you’ve considered
setting curlylint --rule 'indent: 4'
Additional context
Given this code:
{% extends 'home/base.html' %}
{% load cache%}
{% block body %}
{% cache 6000 home.home %}
{{ block.super }}
<p>Last request: {{ date }}</p>
{% endcache %}
{% endblock %}
I get these errors:
curlylint --rule 'indent: 4' apps/home/templates/home/home.html
apps/home/templates/home/home.html
6:8 Bad indentation, expected 4, got 8 indent
7:8 Bad indentation, expected 4, got 8 indent
Oh no! 💥 💔 💥
2 errors reported
Which I can fix like this:
{% extends 'home/base.html' %}
{% load cache%}
{% block body %}
{% cache 6000 home.home %}
{{ block.super }}
<p>Last request: {{ date }}</p>
{% endcache %}
{% endblock %}
Result:
curlylint --rule 'indent: 4' apps/home/templates/home/home.html
All done! ✨ 🍰 ✨
Can we add this feature?
Activity