panoply / vscode-liquid

💧Liquid language support for VS Code
https://marketplace.visualstudio.com/items?itemName=sissel.shopify-liquid
Other
171 stars 22 forks source link

Autoformat adding additional characters on save #120

Closed brady-sewall closed 1 year ago

brady-sewall commented 1 year ago

For example, if I have a liquid file with:

<div>
    <ul class="overflow-y-scroll">
        {%- 
                 render 'global-nav-list', 
                 menu_item_class:'global-nav__menu-item relative my-xs overflow-y-hidden', 
                 menu_base_button_class:'text-h3 md:text-l-h3',
                 menu_base_link_class:'text-h3 md:text-l-h3', 
                 submenu_wrapper_class:'global-nav-mobile__menu-item-with-subitem opacity-0 overflow-y-hidden max-h-0 ml-xs mt-0 mb-0 z-10 space-y-1' 
               -%}
        {% 
                 render 'global-nav-cart-button', 
                 class: 'global-nav__cart-button relative mt-xs w-10 h-10 rounded-full border-neutral-300 border flex items-center justify-center',
               %}
      </ul>
    </div>

When I save the file, it adds an extra > to the last closing div

</div>>

Which breaks the code/layout

machancock commented 1 year ago

I'm having this same issue, I've had to disable the extension for the time being.

freshwater-dev commented 1 year ago

Happening for me as well, and just keeps on adding an extra one after each save, so it could be

>>>>>

Also getting an extra " } " in the closing the schema tag for .liquid files:

{% endschema %}}}}

panoply commented 1 year ago

Hey guys!

Fixed in the latest release v3.1.0

brady-sewall commented 1 year ago

Hey guys!

Fixed in the latest release v3.1.0

Amazing and thank you! Is there a way to manually use v3.1.0 until the official version is released on the VSCode Marketplace?

panoply commented 1 year ago

It should be available to consume on Marketplace. You will likely need to restart editor. Let me know how you go.

brady-sewall commented 1 year ago

It should be available to consume on Marketplace. You will likely need to restart editor. Let me know how you go.

Again, thank you so much! This extension is a lifesaver.