Describe the bug
Code inside the {%- capture -%} tag will not be formatted.
Unformatted source
<div class="text-primary-300 flex no-underline">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In finibus ipsum gravida iaculis pretium. </div>
{%- capture variable -%}
<div class="text-primary-300 flex no-underline">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In finibus ipsum gravida iaculis pretium. </div>
{%- endcapture -%}
Expected output
<div class="text-primary-300 flex no-underline">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In finibus ipsum gravida iaculis pretium.
</div>
{%- capture variable -%}
<div class="text-primary-300 flex no-underline">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In finibus ipsum gravida iaculis pretium.
</div>
{%- endcapture -%}
Actual output
<div class="text-primary-300 flex no-underline">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In finibus ipsum gravida iaculis pretium.
</div>
{%- capture variable -%}
<div class="text-primary-300 flex no-underline">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In finibus ipsum gravida iaculis pretium.</div>
{%- endcapture -%}
Yep that's because capture is space and identation sensitive. Reformating the contents changes the value of the variable. The formatter shouldn't do that per our first principle.
Describe the bug Code inside the {%- capture -%} tag will not be formatted.
Unformatted source
Expected output
Actual output
Debugging information