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] line breaks in inline tags lead to over-indentation of following lines #834

Open
3 tasks done
stefanor opened this issue May 21, 2024 · 0 comments
Open
3 tasks done
Labels
🦠 bug Something isn't working 🧽 formatter

Comments

@stefanor
Copy link

System Info

  • OS: e.g. debian testing
  • Python Version (python --version): 3.11.9
  • djLint Version (djlint --version): 1.34.1
  • template language: e.g. django

Issue

Inline <a> tags with a wrap in them seem to confuse the formatter and lead to the following lines being over-indented.

How To Reproduce

<p>
  <a>b
    c</a> d
</p>

$ djlint --format example.html

example.html
─────────────────────────────────────────────────────────────────────────────────────────────
@@ -1,4 +1,4 @@

 <p>
   <a>b
     c</a> d
-</p>
+  </p>

1 file would be updated.
@stefanor stefanor added 🦠 bug Something isn't working 🧽 formatter labels May 21, 2024
@stefanor stefanor changed the title [BUG] [Formatter] [BUG] [Formatter] line breaks in inline tags lead to over-indentation of following lines May 22, 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