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] unless blocks break indention #972

Open
3 tasks done
Ethaks opened this issue Oct 28, 2024 · 0 comments
Open
3 tasks done

[BUG] [Formatter] unless blocks break indention #972

Ethaks opened this issue Oct 28, 2024 · 0 comments
Labels
🦠 bug Something isn't working 🧽 formatter

Comments

@Ethaks
Copy link

Ethaks commented Oct 28, 2024

System Info

  • OS: current Arch
  • Python Version 3.12
  • djLint Version 1.35
  • template language: handlebars

Issue

#unless blocks are not formatted/indented as the otherwise equivalent #if blocks and break the indention.

How To Reproduce

Format this:

<div>
{{#if foo}}
<div>
  <span>bar</span>
</div>
{{/if}}

{{#unless foo}}
<div><span>bar</span></div>
{{/unless}}
</div>

Removing the outermost div just shows a difference in content indention, keeping is showcases that the closing /unless gets shifted to the left.

@Ethaks Ethaks added 🦠 bug Something isn't working 🧽 formatter labels Oct 28, 2024
@Ethaks Ethaks changed the title [BUG] [Formatter] [BUG] [Formatter] unless blocks break indention Oct 28, 2024
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