Skip to content

prettier-plugin-svelte breaks correct formatting #323

@vrde

Description

@vrde

Describe the bug

prettier-plugin-svelte (that is enabled by default) constantly breaks my formatting. Code like

<div>
  <a href="https://example.com/something-something">Something Something</a>,
  a project about <em>something</em>!
</div>

Is automatically formatted to:

<div>
  <a href="https://example.com/something-something">Something Something</a>
  , a project about
  <em>something</em>
  !
</div>

That leads to render white-spaces before punctuation.

This makes my experience with this extension quite painful. This issue should be addressed in the prettier-plugin-svelte repository, but it seems to be ignored:

I'm writing here to ask if there is any alternative to that formatter.

To Reproduce
Steps to reproduce the behavior:

  • Install the vscode extension
  • Write some html
  • Save it

Expected behavior

I expect the extension to not break my formatting.

Screenshots

Before and after saving:

Peek 2020-07-19 23-54

System (please complete the following information):

  • OS: GNU/Linux
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions