Closed masserra closed 11 months ago
Describe the bug When saving it won't keep it at a defined version, if saved several times it will keep changing the formatting.
Unformatted source
<script> console.log('Data: ', {{ metafields.custom | json }}); console.log('Size: ', {{ artists | size }}); console.log('Condition: ', ` {%- if artists -%} {% if artists.size > 1 %}Various Artists{% else %}Single Artist{% endif %} {%- endif -%} `); console.log('Loop: ', ` {%- if artists -%} {% for artist in artists %} {{ forloop.index }} {% endfor %} {%- endif -%} `); console.log('––––––––––––––––––––––––––––––––––––––'); </script>
Expected output
Actual output 1 (after first save)
Actual output 2 (after second save)
Actual output 3 (after third save)
And so on.... better perceived in the video below
Debugging information
https://github.com/Shopify/prettier-plugin-liquid/assets/5798388/ad8b75e5-857c-4c21-832b-5f7a520f1e8a
Additional context Fresh Dawn theme through Shopify Theme CLI installation
Seeing this too, in VS Code, Sublime Text and using Prettier CLI.
I think this might be the same issue as #171.
I believe this was fixed by https://github.com/Shopify/theme-tools/pull/163 in the latest version
Describe the bug When saving it won't keep it at a defined version, if saved several times it will keep changing the formatting.
Unformatted source
Expected output
Actual output 1 (after first save)
Actual output 2 (after second save)
Actual output 3 (after third save)
And so on.... better perceived in the video below
Debugging information
https://github.com/Shopify/prettier-plugin-liquid/assets/5798388/ad8b75e5-857c-4c21-832b-5f7a520f1e8a
Additional context Fresh Dawn theme through Shopify Theme CLI installation