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] {{_(error)}} becomes {{ _(<class 'regex._regex_core.error'>) }} #1158

Open
3 tasks done
limouren opened this issue Feb 24, 2025 · 0 comments
Open
3 tasks done
Labels
🦠 bug Something isn't working 🧽 formatter

Comments

@limouren
Copy link

System Info

  • OS: macos 14.7.4
  • Python Version (python --version): 3.13.2
  • djLint Version (djlint --version): 1.36.4
  • template language: jinja2

Issue

{{_(error)}} in template is being replaced as {{ _(<class 'regex._regex_core.error'>) }}

How To Reproduce

$ echo '{{_(error)}}' > error.html
$ uv run djlint error.html --extension=html --reformat

Reformatting 1/1 files ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 00:00


error.html
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -1 +1 @@

-{{_(error)}}
+{{ _(<class 'regex._regex_core.error'>) }}

1 file was updated.


$ cat error.html
{{ _(<class 'regex._regex_core.error'>) }}
@limouren limouren added 🦠 bug Something isn't working 🧽 formatter labels Feb 24, 2025
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