sveltejs / prettier-plugin-svelte

Format your svelte components using prettier.
MIT License
735 stars 95 forks source link

Support modifiers on style directives #330

Closed mike-moreau closed 1 year ago

mike-moreau commented 1 year ago

Describe the bug

Hey there,

I'm using Svelte for VS Code to format files on save.

When adding an |important modifier to a style directive in a .svelte file, the modifier gets removed when the file is formatted.

I tried disabling formatting by adding *.svelte to my Prettier ignore file, and the modifier was preserved as expected.

Reproduction

Add a style directive with |important and save the file. Watch it disappear...spooky...

Expected behaviour

Modifier to persist after formatting.

System Info

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response