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] [Linter] Error on empty html elements #275
Comments
Thanks, it seems like it is the unicode encodings on windows. We had a problem like this before, I'll take a look into it. |
From the output you posted, it seems to be crashing on the text color. What language is the computer? I tried it on one of mine without issue, but it was a different windows version. Does this help: Do you have another windows pc you have tested on? Thanks! |
Thanks for the quick response! The machine we're trying to run the linter on is a shared development environment for which I'm not an administrator, so let me talk with the server admin to see if it's reasonable for us to make that change. I'll keep you posted about how it works! |
Changing the locale settings on my personal computer (Windows 10 Pro) did fix the issue on that machine. The machine I'm trying to get djlint to run on is my group's development environment at work, and due to permissions I was not able to get deep enough into the settings to check whether the option is available on that machine (Windows Server 2019 Standard), plus the administrator nixed the idea of changing the locale settings globally even if it is an option. However, I was told there might be a way to change the locale settings locally just for running the linting process, so I can look into that further. I'll also get back to you on your other questions as well, hopefully tomorrow. |
Keep me posted on the test script, if it fails Maybe I can get help from colorama. |
Locally changing locale settings didn't seem super promising (as in, I'm not sure how/whether it can be done), but per your question about how we're calling djlint, I tried it in cmd (rather than git bash), and preliminary testing suggests that the issue may not occur there. |
ok nice, thanks, yeah, in the screen shot you sent, I was either expecting an error, or that the text "test" would be read. I was testing in cmd, I'll try in git bash on my side to see if I can get it. There is an open issue in colorama to support git bash better, but I think we can get around it by setting an env variable. |
I'm able to reproduce it in git bash 👍🏽 I'll play around with it to see if we can get it fixed. Thanks! |
I pushed an update on the dev branch that tis working on my server now. Do you want to test it out?
I'll make a new release soon if this is ok to you. |
I'm seeing one potential additional weirdness related to this bug that I'd like to check on today or tomorrow, and I can also try your update and see how that works. I'll let you know! |
I opened #286 to review the progress bar format on windows. |
🎉 This issue has been resolved in version 1.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Looks great, thanks for the fix! |
System Info
Issue
Error on many html elements with no content, such as
<br>
,<p></p>
,<h1></h1>
, etc..Traceback:
How To Reproduce
A couple of examples where the error occurs:
<p></p>
error_example_1.txt<br>
error_example_2.txtA couple of examples where the error does not occur:
<p>a</p>
success_example_1.txt<br/>
success_example_2.txtThe text was updated successfully, but these errors were encountered: