Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier inserts whitespace between inline HTML tags #503

Closed
harmenjanssen opened this issue Aug 30, 2020 · 1 comment
Closed

Prettier inserts whitespace between inline HTML tags #503

harmenjanssen opened this issue Aug 30, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@harmenjanssen
Copy link

Describe the bug
Prettier will move all HTML tags to new lines, effectively inserting whitespace between them, which gets rendered by the browser.

To Reproduce
Create Example.svelte and include the following:

<p>Lucky number: <span>4</span><span>2</span></p>

Prettier will format this like:

<p>
  Lucky number:
  <span>4</span>
  <span>2</span>
</p>

Whereas it leaves an HTML file with the same contents alone.

Expected behavior

I would expect the inline elements to be left alone, and whitespace preserved.

System (please complete the following information):

  • OS: MacOS Catalina
  • IDE: VSCode 1.48.2
  • Plugin/Package: Svelte for VS Code v101.11.1
@harmenjanssen harmenjanssen added the bug Something isn't working label Aug 30, 2020
@dummdidumm
Copy link
Member

Duplicate of #323

@dummdidumm dummdidumm marked this as a duplicate of #323 Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants