Each blocks without as clause highlight incorrectly

#2829

Issue

Open
R
Rich-Harris
Aug 14, 2025, 4:30 PM

Describe the bug

It's now possible to omit the as blah clause from an each block, but it results in incorrect highlighting

Image

Reproduction

{#each x as _}-{/each}
{#each x as}-{/each}

Expected behaviour

The syntax highlighting should be the same in both cases (I guess it's noteworthy that GitHub syntax highlighting exhibits the same bug)

System Info

latest

Which package is the issue about?

No response

Additional Information, eg. Screenshots

No response

Info

Assignees None
Labels bug
Milestone None