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] </textarea> dedents weirdly #938

Open
3 tasks done
mousetail opened this issue Oct 12, 2024 · 0 comments
Open
3 tasks done

[BUG] [Formatter] </textarea> dedents weirdly #938

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

Comments

@mousetail
Copy link

System Info

  • OS: Ubuntu 20.04.5
  • Python: 3.10.12
  • djLint Version (djlint --version): 1.35.2
  • template language: Tera, I'm using the Jinja profile for djLint

Issue

Multiline <textarea> block dedent completely.

DJLint formats the code as follows:

<form method="post">
  <textarea name="code">
    {%- if object.code -%}
      {{- object.code -}}
    {%- endif -%}
</textarea>
  <input>
</form>

But I expect lie this:

<form method="post">
  <textarea name="code">
    {%- if object.code -%}
      {{- object.code -}}
    {%- endif -%}
  </textarea>
  <input>
</form>

How To Reproduce

Try to format the code above. Settings are default.

@mousetail mousetail added 🦠 bug Something isn't working 🧽 formatter labels Oct 12, 2024
@mousetail mousetail changed the title [BUG] [Formatter] [BUG] [Formatter] </textarea> dedents weirdly Oct 12, 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