-
-
Notifications
You must be signed in to change notification settings - Fork 86
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] long textarea in twig - line wrapping does not work #486
Comments
## [1.19.8](v1.19.7...v1.19.8) (2022-12-15) ### Bug Fixes * **attributes:** fixed outer quotes being stripped from attribute values ([dff02dc](dff02dc)), closes [#471](#471) * **settings:** fixed pyproject loader ([5890161](5890161)), closes [#469](#469) * **textarea:** fixed textarea attribute formatting ([e7c904e](e7c904e)), closes [#486](#486)
🎉 This issue has been resolved in version 1.19.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hello Chris! Unfortunately, no change for textarea.
This code
is reformatting to one line back even if I format it manually and the settings are:
I extracted this textarea attribute alone to separate file. No Changes. |
Even out of VS code extension:
|
hmm, its odd, I will check it out. The new test is passing nicely. https://github.com/Riverside-Healthcare/djLint/blob/68c155a7cf74e4e5e7db6911ab4c5dd8551137ca/tests/test_html/test_tag_textarea.py#L81 |
BTW: I removed it and .. no changes. |
no problem, we don't check for anything being standard except for changing case ;) |
I tried it out in the online demo and it is working: can you send more surrounding html or a full file? |
Holy cow ! You have demo page!! hope, files can help: |
hmm, I have cleaned up (just left {} ) config file and vua-la, it formats well!!! But I see nothing illegal inside it (included in zip above). |
thanks! I'll check it out! |
I think I found the bug.. I'll see about getting a change out soon. the |
…tted output stdin with --check was returning the original code, but should be returning the formatted code. closes #486
## [1.19.9](v1.19.8...v1.19.9) (2022-12-16) ### Bug Fixes * **stdin --check:** stdin with the --check flag should return a formatted output ([57e1eec](57e1eec)), closes [#486](#486)
🎉 This issue has been resolved in version 1.19.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Alas! the same:
config is the same:
|
ty, will keep looking :) Your bugs always escape.. |
@palansher try reducing the {
"ignore": "H021,H030,H031,H017,H023,H014,H006",
"extension": "twig",
"indent": "4",
"profile": "nunjucks",
"format_attribute_template_tags": false,
"max_line_length": "110",
"max_attribute_length": "50",
"preserve_blank_lines": "true"
} will make it format. |
@palansher hope things are well, haven't heard from you here in a while 😅 no bugs I guess 😁 |
@christopherpickering max_line_length is not honoured for .jinja extensions |
Issue
Your Djlint becomes better and better. Thank you!
How To Reproduce
I cannot reformat such long lines
for like this:
It still one long line.
Same time, the long 'inputs' and 'divs' are wrapped well.
Please give your helping hand!
BTW,
By, according to my observations, for textareas
this style
is more prefferable then this
Because in the second variant the browser adds extra ugly <CR/LF> trash to the end of content of textarea field.
It happens when we have the combination of next three consistently: "content text" + line feed + "</textarea>".
So, the middle line feed makes the problem.
my conf:
.djlintrc
System Info
The text was updated successfully, but these errors were encountered: