vscode-liquid icon indicating copy to clipboard operation
vscode-liquid copied to clipboard

Multi-line element scripts indented too many times

Open Christopher-Hayes opened this issue 2 years ago • 2 comments

image

Description

Every time I run "Liquid: Format Document", the scripts after the @click line get indented like 20 times. If I run format again, it gets indented another 20 times.

This seems to only happen if I have the {% if %} inside the element properties. If I remove conditional, it indents as expected.

Temporary work-around

Don't use {% if %} inside element properties.

Christopher-Hayes avatar Jun 22 '22 17:06 Christopher-Hayes

Hey @Christopher-Hayes

Thanks for the information. This was fixed in Prettify which will be used in future releases of the extension. If you can hold out a little longer I will ship a pre-release candidate for this.

panoply avatar Jun 22 '22 20:06 panoply

Cool, thanks @panoply

Christopher-Hayes avatar Jun 22 '22 20:06 Christopher-Hayes

🚢 Shipped v3.0.0

panoply avatar Sep 28 '22 08:09 panoply