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] Custom template tags beginning with 'set' breaks the tag #634

Closed
3 tasks done
mfisco opened this issue May 10, 2023 · 2 comments · Fixed by #638
Closed
3 tasks done

[BUG] [Formatter] Custom template tags beginning with 'set' breaks the tag #634

mfisco opened this issue May 10, 2023 · 2 comments · Fixed by #638
Labels

Comments

@mfisco
Copy link

mfisco commented May 10, 2023

System Info

  • OS: macOS Ventura 13.3.1 (a)
  • Python Version: 3.10.6
  • djLint Version: >= 1.25.1
  • template language: Django

Issue

A custom simple_tag that's prefixed with set (e.g., setting, setdate, etc.) splits the tag's name.

If you downgrade back to version 1.25.0, the formatter works as expected. Possibly related to #557 included in the 1.25.1 release.

How To Reproduce

  1. Create a template that's already formatted:
    <title>{% set_title "My Title" %}</title>
  2. Running djlint --reformat should have no effect, but gives this output:
    <title>{% set _title "My Title" %}</title>
@mfisco mfisco added 🦠 bug Something isn't working 🧽 formatter labels May 10, 2023
@welcome
Copy link

welcome bot commented May 10, 2023

Thanks for opening your first issue here!

@mfisco mfisco changed the title [BUG] [Formatter] Custom template tags beginging with 'set' breaks the tag [BUG] [Formatter] Custom template tags beginning with 'set' breaks the tag May 10, 2023
christopherpickering pushed a commit that referenced this issue May 10, 2023
## [1.27.1](v1.27.0...v1.27.1) (2023-05-10)

### Bug Fixes

* **formatter:** fixed set_ tags being broken ([5cf1e1c](5cf1e1c)), closes [#634](#634)
* **linter:** fixed false positive on H037 ([e65558c](e65558c)), closes [#633](#633)
@christopherpickering
Copy link
Contributor

🎉 This issue has been resolved in version 1.27.1 🎉

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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants