Skip to content

deno fmt skips formatting Svelte file if the template begins with conditional fork #36389

Description

@zendive

Version: Deno 2.9.4

Command deno fmt --unstable-component skips formatting Svelte file if the template begins with a conditional fork. If it begins with some kind of <node> HTML syntax then it works.

Worked in Deno 2.8.0

Example to reproduce: demo.svelte (without custom fmt config)

<script lang="ts">
		import foo from "./foo.ts";




</script>




{#if foo}
		bar

			{:else}


	baz
{/if}

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