Skip to content

🐛 BUG: Prettier is expanding self closing empty tags into its full form #325

@ni554n

Description

@ni554n

Describe the Bug

Prettier is unnecessarily turning any <svg /> like tags into <svg></svg> in a .astro file.
Only default HTML elements are affected; custom ones are fine.

Steps to Reproduce

https://stackblitz.com/edit/node-dyqbs8?file=src%2Fpages%2Findex.astro,src%2Fcomponents%2FCustom.astro,package.json

Open src/pages/index.astro and run npm run format

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: nice to haveNot breaking anything but nice to have (priority)ecosystem: compilerIssue is caused by a bug in the Astro compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions