g-plane / markup_fmt

Configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks and Vento formatter with dprint integration.
https://dprint.dev/plugins/markup_fmt/
MIT License
107 stars 10 forks source link

fmt(svelte): formatter error on dynamic style in svelte #82

Open MohammadSu1 opened 5 days ago

MohammadSu1 commented 5 days ago

Version Deno 2.1.1

<script lang="ts">
  const { color }: { color: string | null } = $props();
</script>

<div
  style="background-color: {color || 'blueviolet'};"
>
</div>
deno fmt --unstable-component
Error formatting: C:\temp\deno-init\test.svelte
   syntax error at line 6, col 28: expect token `<ident>`, but found `{`
Checked 4 files

Originally reported in https://github.com/denoland/deno/issues/26999

g-plane commented 4 days ago

This is a known issue, but hard to fix at this moment.