framework
framework copied to clipboard
Support `for x in y` with `else`
From the Svelte docs:
An each block can also have an {:else} clause, which is rendered if the list is empty.
{#each todos as todo}
<p>{todo.text}</p>
{:else}
<p>No tasks today!</p>
{/each}
Would be nice to have the same thing in Mayu.
= for todo in todos
%p= todo.text
= else
%p No tasks today!