Skip to content

Extra spaces are added when rending markup #15655

@gyzerok

Description

@gyzerok

Describe the bug

In following code sample I'd expect it to render helloworld without spaces:

hello
{#if true}
	world
{/if}

Coming from React I'd expect one would need to explicitly put space there for it to appear:

hello
{#if true}
	{' '}world
{/if}

Perhaps the same problem could be also experienced with other templating syntax such as {#each}.

Reproduction

REPL

Logs

System Info

Svelte 5.25

Severity

annoyance

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