Closed mrkanister closed 4 years ago
Before, the formatter would apply the following simplification:
Input:
{% icon 'name' with { classList: 'classA' ~ (not needsB ? ' classB') } %}
Output:
{% icon 'name' with { classList: 'classA' ~ not needsB ? ' classB' } %}
Although operator precedence should allow us to drop the braces, this could e.g. cause the following to happen when rendering the template:
With braces:
<span class="classA classB">...</span>
Without braces:
<span class=" classB">...</span>
The left part of the concatenation essentially turned into a whitespace. Now, braces are being placed around these expression combinations.
Before, the formatter would apply the following simplification:
Input:
Output:
Although operator precedence should allow us to drop the braces, this could e.g. cause the following to happen when rendering the template:
With braces:
Without braces:
The left part of the concatenation essentially turned into a whitespace. Now, braces are being placed around these expression combinations.