Conversation
🦋 Changeset detectedLatest commit: b47ba90 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
(note that this doesn't change anything in regard to syntax highlighting or language-tools etc; that would have to happen as a follow-up) |
|
Nice idea! I have to see how much this would complicate/fuck up our TextMate syntax highlighting grammar. Also, for pretty printing this information absolutely must live somewhere, else it will just be deleted on format. |
|
JS/TS comments live on
What if we did the same for these? |
|
alright, comments are now printing correctly if you use the included |
|
adding prettier support was straightforward sveltejs/prettier-plugin-svelte#510, now still needs language tools support (or rather I need to check if it breaks stuff; and we need syntax highlighting) |

Alternative to #17188. I prefer this syntax, it's lighter and feels much more natural to me. For me it's less about commenting things out than about just, well... commenting — I frequently want to do this sort of thing:
One difference between this and #17188 is that this doesn't add a node to the AST, just like comments in CSS/JS. Haven't decided if that's desirable or not. I think it's more correct (it's an AST, not a CST; HTML comments are different insofar as they can represent 'real' nodes) but it might be less convenient when (for example) pretty-printing.
Before submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.packages/svelte/src, add a changeset (npx changeset).Tests and linting
pnpm testand lint the project withpnpm lint