Closed tomdavies closed 1 year ago
similar case as #287
Hello we have the same problem here when using djlint
with the same configuration. Is there a way to exclude theses from linting through the config file?
Before:
<div class="w-full">
{{
sylius_template_event(
'sylius.shop.cart.summary',
{
cart: cart
}
)
}}
</div>
After:
<div class="w-full">
{{
sylius_template_event(
'sylius.shop.cart.summary',
{
cart: cart
}
)
}}
</div>
@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
@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 }}
were missing. I assumed it was an accident and made djlint format only full tags ;)
Thanks @christopherpickering much appreciated! Will check this out. And yes, that was a typo in my crumby example code 😄
:tada: This issue has been resolved in version 1.28.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
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!