-
-
Notifications
You must be signed in to change notification settings - Fork 85
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] object/array variable whitespace is removed #370
Comments
similar case as #287 |
Hello we have the same problem here when using Before:
After:
|
@oliver-schulz sorry I missed the question about excluding. If you didn't already find it, you can do it like: <div class="w-full">
{# djlint:off #}
{{
sylius_template_event(
'sylius.shop.cart.summary',
{
cart: cart
}
)
}}
{# djlint:on #}
</div> |
Link to twig expressions: https://twig.symfony.com/doc/3.x/templates.html#expressions |
## [1.25.1](v1.25.0...v1.25.1) (2023-05-08) ### Bug Fixes * **js indent:** fixed an issue where literal strings were double indented ([b1e8ab2](b1e8ab2)), closes [#614](#614) * **set:** added formatting of json/list style set contents ([85aca4c](85aca4c)), closes [#287](#287) [#518](#518) [#370](#370)
@tomdavies @oliver-schulz thanks for waiting on this, the next release will fix both examples you provide :) Just noting in @tomdavies there was a typo, the closing |
Thanks @christopherpickering much appreciated! Will check this out. And yes, that was a typo in my crumby example code 😄 |
# [1.28.0](v1.27.2...v1.28.0) (2023-05-18) ### Bug Fixes * **formatter:** allow djlint:off to exluce the rest of a file ([17faf5f](17faf5f)), closes [#649](#649) * **formatter:** don't add blank line to empty files ([8ea5fd2](8ea5fd2)), closes [#635](#635) ### Features * **formatter:** added ability to format objects/arrays in function tags ([d446efc](d446efc)), closes [#370](#370) * **formatter:** format set blocks ([d88371c](d88371c)), closes [#646](#646)
🎉 This issue has been resolved in version 1.28.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
System Info
Issue
All whitespace is removed from multi-line
{% set = {} %}
statements (e.g when declaring a nested object), and also from object function parameters formatted in the same way.How To Reproduce
Given the input:
I get the output
When I expect indentation to be applied to the keys/values in my variable declarations per my
.djlintrc
:Thanks so much for your work on djLint!
The text was updated successfully, but these errors were encountered: