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]It will parse the HTML tags in the string. #742

Closed
3 tasks done
Taikono-Himazin opened this issue Aug 23, 2023 · 2 comments
Closed
3 tasks done

[BUG] [Formatter]It will parse the HTML tags in the string. #742

Taikono-Himazin opened this issue Aug 23, 2023 · 2 comments

Comments

@Taikono-Himazin
Copy link

Taikono-Himazin commented Aug 23, 2023

System Info

  • OS: Windows 10
  • Python Version (3.11.4)
  • djLint Version (1.32.1)
  • template language: django templete

Issue

It will parse the HTML tags in the string.

How To Reproduce

Using djlint for HTML with below code.

{{ some_val | default:'some_comment1<br>some_comment2' }}

becomes as follows
Doing this will prevent {{}} from being treated as a variable and will break the display.

{{ some_val | default:'some_comment1
<br>
some_comment2' }}

I would expect something like

{{ some_val | default:'some_comment1<br>some_comment2' }}
@Taikono-Himazin Taikono-Himazin added 🔍 linter 🦠 bug Something isn't working labels Aug 23, 2023
@christopherpickering
Copy link
Contributor

Thanks for reporting.

@christopherpickering christopherpickering changed the title [BUG] [Linter]It will parse the HTML tags in the string. [BUG] [Formatter]It will parse the HTML tags in the string. Sep 18, 2023
christopherpickering pushed a commit that referenced this issue Sep 18, 2023
# [1.33.0](v1.32.1...v1.33.0) (2023-09-18)

### Bug Fixes

* **formatter:** fixed extra breaks added around html tags inside template tags ([6091ffb](6091ffb)), closes [#742](#742)
* **formatter:** fixed extra indend in script tags ([9d04d51](9d04d51)), closes [#733](#733)
* **formatter:** fixed formatting on functions that used python keywords as the param name ([183a7c0](183a7c0)), closes [#756](#756)
* **h033:** fix rull to not match data-action ([f6881e0](f6881e0))
* **linter:** fixed false positive on DJ018 ([78d81dc](78d81dc)), closes [#755](#755)

### Features

* **formatter:** added support for nunjucks async loop tags ([5a32bb3](5a32bb3))
@christopherpickering
Copy link
Contributor

🎉 This issue has been resolved in version 1.33.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants