web-mode
web-mode copied to clipboard
Svelte multiline elements
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.