Closed g-plane closed 1 month ago
Please note that interpolations in attribute name and attribute value won't be formatted. This is expected since they're parsed as plain texts.
I think it's better like that for now. Parsing and formatting interpolation in attribute value will add complexity and is not always safe if whitespace are important (in href
values for example)
@g-plane This seems to cause an issue for the following snippet that is not parsing anymore:
<picture
{% for key, val in attributes.items %}
{{ key }}="{{ val }}"
{% endfor %}
></picture>
I get this Failed to parse "src/t.html" with error Syntax(SyntaxError { kind: ExpectJinjaTag, pos: 61, line: 3, column: 11 })
. This is failing to parse {{ key }}
because it expect a JinjaTag.
Please note that interpolations in attribute name and attribute value won't be formatted. This is expected since they're parsed as plain texts.
cc @UnknownPlatypus