Open
Description
Describe the bug
I was trying to include a space after a comma in an if-statement. Consider this repro:
<script>
const length = 10;
</script>
{#each { length } as _, i}
{@const nth = i + 1}
{nth}{#if nth !== length}, {/if}
{/each}
I did want the space to be a breaking space, so
wouldn't work here. I tried  
which I believe is the equivalent code for a traditional breaking space, but that did not work either. (e.g. {nth}{#if nth !== length}, {/if}
).
Finally, I did something accidentally and reordered the two lines inside the enclosing {#each}
block, only to find that change did achieve what I was trying to do even without a space or special char, but I feel like it shouldn't since the variable is now declared after it's used.
<script>
const length = 10;
</script>
{#each { length } as _, i}
{nth}{#if nth !== length},{/if}
{@const nth = i + 1}
{/each}
Reproduction
REPL links above
Logs
No response
System Info
macOS v13.1 (22C65)
Svelte v3.58.0 (in REPL)
Severity
annoyance