Open asolopovas opened 3 months ago
I have some examples like:
{% set item_kwargs = {
"label": label,
"disabled": item.disabled,
"selected": item.selected,
"two_line": two_line,
"callback": callback,
"item_attrs": item_attrs,
"first_unselected": (_parent and loop.first and none_selected)
} %}
{% if _checkboxes_name %}
{% do item_kwargs.update({
"checkbox_kwargs": {
"name": _checkboxes_name,
"value": item.value,
"id": _checkboxes_name + "--id-" + loop.index|str,
}
}) %}
the indentation djlint is enforcing here seems quick wacky and inconsistent
System Info
WSL
python --version
) ===3.10.14
djlint --version
) ===1.34.1
twig
Issue
Is it normal to have closing
} %}
be hanging in the middle of the line?isn't it looking better this way?
Please note that I indented the anchor tag
<a
specifically by 16 spaces to demonstrate that spacing added to indent properties is not event depending on how far the parent is indented, further indentation of parent nesting, results in further indentation of all of the object. In first example above object properties got indented by 24 spaces from line above{% set
.If tag is located at root indentation like bellow:
it indents object properties by 8 spaces instead of required indentation of 4