Closed genericFJS closed 4 months ago
Thanks, @dummdidumm for tackling this issue. Sadly your fix did not help. Following (manual) test cases still get mangled:
{@render test((()=>"a")())}
{@render test(t())}
Result after running prettier:
{@render test((()}
{@render test(t()}
Can you reopen this ticket?
My bad, I thought this is about the snippet block but it's about the render tag
Thanks a lot. That did the trick. I appreciate your work!
Describe the bug
When using the new Svelte 5 snippet feature and any parameter in the \@render-block contains a closing bracket
)
(for example a parameter that is a function call), any code after the first bracket gets deleted on format (npm run format
).Reproduction
See repo: prettier-snippet-bug Or:
npm create svelte@latest prettier-snippet-bug
+page.svelte
with:{@render test("a")} {@render test((()=>"a")())}
This always happens when there is a closing bracket inside a parameter (i.e. any function call).
Logs
System Info
Severity
annoyance