Closed drzax closed 5 months ago
I'm seeing this as well, but with a comment preceding a <script>
tag rather than a <style>
tag.
Interestingly, it only happens when that <script>
tag exists within a <svelte:head>
tag, like so:
<svelte:head>
<!-- Fathom Analytics -->
<script
src="https://xxx.alexlafroscia.com/script.js"
data-site="xxx"
data-spa="auto"
defer
></script>
</svelte:head>
The <!-- Fathom Analytics -->
line is repeated each time Prettier formats the file
This looks to be a very similar issue to #205.
The following works as a minimum repro in Svelte for VS Code v107.10.0
But both of the following work as expected
So it appears to be the combination of the
<style>
tag and nested structure that triggers the bug.