This PR changes no code other than the ordering of things. It prioritizes first whether the current line is a closing template block line ({/each}, {/if}, etc.) prior to checking the previous line. This provides what I believe is the correct indentation of empty blocks. Take for example the following workflow:
I write out {#if statement} on one line, hit enter, and then type out the closing part of the block {/if}, assuming that the plugin will handle indentation. Below is the diff between the current version and the update:
This PR changes no code other than the ordering of things. It prioritizes first whether the current line is a closing template block line (
{/each}
,{/if}
, etc.) prior to checking the previous line. This provides what I believe is the correct indentation of empty blocks. Take for example the following workflow:I write out
{#if statement}
on one line, hit enter, and then type out the closing part of the block{/if}
, assuming that the plugin will handle indentation. Below is the diff between the current version and the update: