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

🐛 BUG: Content is deleted when fixing self-closing br tag #421

Open
ac-lebrun opened this issue Jul 10, 2024 · 1 comment
Open

🐛 BUG: Content is deleted when fixing self-closing br tag #421

ac-lebrun opened this issue Jul 10, 2024 · 1 comment
Labels
needs response Need a response from the original author

Comments

@ac-lebrun
Copy link

Describe the Bug

Hi,
My HTML code contains an incorrect br tag that is used with children <br>some content</br> (br was conflated with p). It is automatically turned into a self-closed <br /> when I save my .astro file, great, but this also removes the content which is lost.

Steps to Reproduce

  1. npm init astro
  2. Create a page containing <br>some content</br>
  3. Save file in VS code, using Astro plugin
  4. The br tag will become self-closed but "some content" will be lost
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 10, 2024
@Princesseuh
Copy link
Member

For me this seems to just move the content after the tag, like it'd do in browsers:

<br>some content</br>

becomes

<br />some content

This is expected behaviour at this time

@Princesseuh Princesseuh added needs response Need a response from the original author and removed needs triage Issue needs to be triaged labels Jul 10, 2024
@Princesseuh Princesseuh transferred this issue from withastro/language-tools Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs response Need a response from the original author
Projects
None yet
Development

No branches or pull requests

2 participants