tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
485 stars 38 forks source link

{:else} & {/if} formatting outdented #21

Closed btakita closed 5 years ago

btakita commented 5 years ago

On reformat, {:else} & {/if} get outdented.

svelte-plugin-formatting-issue

tomblachut commented 5 years ago

Weird. Could you paste this snippet as text?

RobbieTheWagner commented 5 years ago

Not sure if this is the same issue I am seeing, but when I autoformat, my svelte tags get indented too far, rather than respecting the html settings.

<svelte:head>
  <title>{title}</title>

    {#each meta as item}
      <meta name={item.name} content={item.content}/>
    {/each}

    {#each link as item}
      <link rel={item.rel} href={item.href}/>
    {/each}
</svelte:head>

Note that title is correctly indented 2 spaces, and the each blocks get indented 4.

tomblachut commented 5 years ago

@rwwagner90 I've pasted your code into empty file in version 0.8.0 and it indents properly. Let me know if it still happens for you