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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 BUG: Label element split onto next line #189

Closed
SteveALee opened this issue May 7, 2022 · 2 comments
Closed

馃悰 BUG: Label element split onto next line #189

SteveALee opened this issue May 7, 2022 · 2 comments

Comments

@SteveALee
Copy link

SteveALee commented May 7, 2022

Describe the Bug

Some instances of <label> are incorrectly formated with the closing %gt; being placed on a nerw line

---
---
<label
  >Text:
  <span>ss</span>
</label>

Steps to Reproduce

Astro file as follows and run npx prettier -w .as described in the README

---
---
<label>Text:
  <span>ss</span>
</label>
@SteveALee SteveALee changed the title Label element split onto next line馃悰 BUG: 馃悰 BUG: Label element split onto next line May 7, 2022
@Princesseuh
Copy link
Member

Princesseuh commented Jun 24, 2022

This is due to HTML whitespace sensitivity. See https://github.com/sveltejs/prettier-plugin-svelte#why-is-the-closing-or-opening-tag--or--hugging-the-inner-tag-or-text for more information on this subject.

Closing since this is not an issue, thank you for the report nonetheless!

@Princesseuh Princesseuh added the needs-info Needs additionally information / an answer from the poster label Jun 24, 2022
@antonyfaris
Copy link
Member

The same thing seems to happens inside an HTML file. I think this might be normal Prettier behaviour?

You can see how Prettier formats this snippet in their playground.

@Princesseuh Princesseuh removed the needs-info Needs additionally information / an answer from the poster label Jun 24, 2022
@Princesseuh Princesseuh closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants