question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comments get removed from formated Svelte Component

See original GitHub issue

Hi when I format a svelte component, any comment that is at the end of an element gets removed.

Gets removed:

<div>
    <div/>
    <!-- testing 123 -->
</div>

Doesn’t get removed:

<div>
    <!-- testing 123 -->
    <div/>
</div>

Any solutions?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dummdidummcommented, Feb 20, 2021

This was released in the VS Code extension version 104.4.2

1reaction
SaintPepsicommented, Feb 17, 2021

Thanks for fixing that so quickly!

Kind Regards, Ian Hogers

Email Signature, phone: 0458 452 419, email: info@ianhogers.com On 2/17/2021 7:45 PM, Simon H wrote:

Closed #207 https://github.com/sveltejs/prettier-plugin-svelte/issues/207 via #208 https://github.com/sveltejs/prettier-plugin-svelte/pull/208.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sveltejs/prettier-plugin-svelte/issues/207#event-4340144501, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2QDN4EQILYZ5PGH6JI3R3S7N63XANCNFSM4XVM3NOQ.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML comments inside svelte markup cause formatting to fail
HTML comments inside svelte markup prevents remaining markup from being formatted. To Reproduce For example (with "svelteStrictMode": true ) this: <Component ...
Read more >
Docs • Svelte
You can use HTML comments inside components. ... Comments beginning with svelte-ignore disable warnings for the next block of markup. Usually, these are ......
Read more >
"Svelte for VS Code" with Prettier deletes commented code
I installed Svelte for VS Code. When I saved .svelte file all comments get deleted. This does not happen for .html, .js or...
Read more >
prettier-plugin-svelte | Yarn - Package Manager
Format your HTML, CSS, and JavaScript using prettier; Format Svelte syntax, e.g. each loops, if statements, await blocks, etc.
Read more >
Add a commenting platform to a Svelte app
Create a Svelte component that displays comments. The component is as simple as this (corresponding pull request):. <svelte:head> <script src=" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found