sveltejs / prettier-plugin-svelte

Format your svelte components using prettier.
MIT License
715 stars 95 forks source link

`{/if}` should get moved to the next line if `htmlWhitespaceSensitivity` is set to `"ignore"` #360

Open DetachHead opened 1 year ago

DetachHead commented 1 year ago

before

<script>
     if (true) {
          console.log('asdf')}
</script>

{#if true}
    <p>asdf</p>{/if}

after

<script>
    if (true) {
        console.log('asdf')
    }
</script>

{#if true}
    <p>asdf</p>{/if}

the closing } in the js gets moved, so i would expect the same to happen with the {/if}.

i have htmlWhitespaceSensitivity set to "ignore" which doesn't make a difference