djLint
djLint copied to clipboard
[BUG] [Formatter] {% comment %} djlint:off {% endcomment %} will be abnormally indented
- [X] I'm on the latest version of djLint
- [X] I've searched the issues
- [x] I've read the docs
System Info
https://djlint.com/demo/ running with Python 3.10.2; djLint 1.19.16
Issue
if use {% comment %} djlint:off {% endcomment %} will get abnormally indented
How To Reproduce
put on to https://djlint.com/demo/
<nav class="navbar navbar-expand-lg navbar-light bg-light main-nav p-3">
<div class="collapse navbar-collapse" id="navBar">
<div class="navbar-nav ml-auto">
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle mr-4"
href="#"
id="navbarDropdownMenuLink"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
{{ request.user.name }}
</a>
<div class="dropdown-menu"
style="min-width: 105px;
width: 105px"
aria-labelledby="navbarDropdownMenuLink">
{% comment %} djlint:off {% endcomment %}
<a class="dropdown-item"
href="http://user/login">變更密碼</a>
{% comment %} djlint:on {% endcomment %}
</div>
</li>
</ul>
</div>
</div>
</nav>
after remove {% comment %} djlint:off {% endcomment %} , formater is ok, but i get H022 😥
Thanks for the good example!
@we684123 sorry for the delay, I should have a fix out shortly.
@christopherpickering Thank you for fixing this issue ♪(´▽`)
:tada: This issue has been resolved in version 1.19.17 :tada:
The release is available on:
Your semantic-release bot :package::rocket: