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] Reformatter adds a space before variable in HTML tag #839

Open
3 tasks done
PetrDlouhy opened this issue Jun 10, 2024 · 0 comments
Open
3 tasks done
Labels
🦠 bug Something isn't working 🧽 formatter

Comments

@PetrDlouhy
Copy link

PetrDlouhy commented Jun 10, 2024

System Info

  • OS: Ubuntu 23.1
  • Python Version (python --version): Python 3.11.6
  • djLint Version (djlint --version): version 1.34.1
  • template language: Django

Issue

I have dynamic heading in my Wagtail template:

<h{{ header_level }}>{{ value }}</h{{ header_level }}>

It gets reformatted to:

<h {{ header_level }}>{{ value }}</h {{ header_level }}>

which breaks the code.

My pyproject.toml:

  [tool.djlint]
  profile="django"
  custom_blocks="cache,scribble,experiment,recursetree,linebreakless,blocktrans"
  custom_html="source,picture,img,defs,symbol,path"
@PetrDlouhy PetrDlouhy added 🦠 bug Something isn't working 🧽 formatter labels Jun 10, 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