web-mode icon indicating copy to clipboard operation
web-mode copied to clipboard

Svelte multiline elements

Open GuyShane opened this issue 4 years ago • 0 comments

When I try to make a svelte element with several properties on individual lines, the indentation and highlighting gets a little messed up.

For example, the following code is formatted with incorrect tabs:

<div id="example"
     contenteditable
     bind:innerHTML={text}
         on:click={handleClick}
     on:dblclick={handleDouble}
         on:copy={handleCopy}
     on:keypress={handleKeypress}>
</div>

I would expect to be formatted like this:

<div id="example"
     contenteditable
     bind:innerHTML={text}
     on:click={handleClick}
     on:dblclick={handleDouble}
     on:copy={handleCopy}
     on:keypress={handleKeypress}>
</div>

It does, however, work as expected when surrounding values in quotes:

<div id="example"
     contenteditable
     bind:innerHTML="{text}"
     on:click="{handleClick}"
     on:dblclick="{handleDouble}"
     on:copy="{handleCopy}"
     on:keypress="{handleKeypress}">
</div>

I would just prefer to be able to omit quotes when using dynamic values if possible.

GuyShane avatar Jun 12 '20 05:06 GuyShane