Skip to content

Svelte 5: Whitespace before the closing brace of {#snippet} will throw a parse error. #12156

Closed
@ota-meshi

Description

@ota-meshi

Describe the bug

The following template throws a parse error, but previously worked:

{#snippet test(x) }
{/snippet}

It seems that even after #12144 has been applied, this issue has still not been fixed.

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAEy3IQQqAIBAF0KvIb1MgtHfXOapF5AiC2dBMUYh3j6DlewUhJhK4sSAvG8FhYIaFPvxBLkpKsJD9PNZvSiM5MpMaJdH27kydcun_rFOGxbb7GCJ5OD1OqnN9AX58jWdnAAAA

Logs

Error compiling App.svelte:
Expected token }

System Info

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M3
    Memory: 31.33 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.15.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.7.0 - /usr/local/bin/npm
    pnpm: 9.4.0 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 126.0.6478.63
    Chrome Canary: 121.0.6124.0
    Safari: 17.4.1
  npmPackages:
    svelte: ^5.0.0-next.164 => 5.0.0-next.164

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions