-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the bug
You cannot have an unclosed HTML element inside an if block. Meaning you couldn't do conditional div tags in a loop for example
{#each things as thing, index}
{#if index % 10 === 0}
<div class="new-div">
{/if}
Some other content
{#if index % 10 === 0}
</div>
{/if}
{/each}
That code is a bad example, but it should create a new div every tenth element. Instead it throws an error because the first if block has the unclosed div in it.
This however works fine
{#each things as thing, index}
{#if index % 10 === 0}
<div class="new-div"></div>
{/if}
{/each}
Lonami, hauselin and manuthinkcoconuttanhauhau, webmstk and derharry
Metadata
Metadata
Assignees
Labels
No labels