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

[BUG] [Formatter] Incorrect indentation around timezone tags #819

Open
3 tasks
samamorgan opened this issue Mar 4, 2024 · 1 comment
Open
3 tasks

[BUG] [Formatter] Incorrect indentation around timezone tags #819

samamorgan opened this issue Mar 4, 2024 · 1 comment
Labels
🦠 bug Something isn't working 🧽 formatter

Comments

@samamorgan
Copy link

System Info

  • macOS Sonoma 14.2.1
  • Python 3.10.11
  • djLint 1.34.1
  • template language: Django

Issue

The formatter incorrectly indents around timezone tags.

How To Reproduce

The following code pasted into a template

<div>
  <div>
    {% timezone object.zone_info %}
      <p>{% now "F jS, Y h:i A e" %}</p>
    {% endtimezone %}
  </div>
</div>

Indents like so

<div>
  <div>
    {% timezone object.zone_info %}
    <p>{% now "F jS, Y h:i A e" %}</p>
  {% endtimezone %}
</div>
</div>
@samamorgan samamorgan added 🦠 bug Something isn't working 🧽 formatter labels Mar 4, 2024
@samamorgan
Copy link
Author

Note: I was able to resolve this by adding custom_blocks = "timezone" to pyproject, but this is a Django feature and should be internally recognized by djlint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦠 bug Something isn't working 🧽 formatter
Projects
None yet
Development

No branches or pull requests

1 participant