withastro / prettier-plugin-astro

Prettier plugin for Astro
Other
475 stars 33 forks source link

fix: hug when needed for components and fragments #397

Closed Princesseuh closed 8 months ago

Princesseuh commented 8 months ago

Changes

Previously, components, fragments and custom elements were considered to be block elements, this is kinda incorrect as they're all whitespace sensitive by default.

In the future, a better way would be to be CSS-based, like Prettier itself is. But that's a much larger refactor.

Fix https://github.com/withastro/prettier-plugin-astro/issues/352

Testing

Updated tests for this

Docs

N/A

changeset-bot[bot] commented 8 months ago

🦋 Changeset detected

Latest commit: 3b28717a5234bef0c5ba013c021a73f7efe245f4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | --------------------- | ----- | | prettier-plugin-astro | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

catdevnull commented 8 months ago

When is this getting tagged? This is kinda annoying

Princesseuh commented 8 months ago

When is this getting tagged? This is kinda annoying

Will do tomorrow, sorry for the delay! I didn't want to release this right when I merged because we were still in the holidays for most of the team, but it should've been done last week and I forgot.