Skip to content

fix(printer): match Prettier's HTML printer - #474

Merged
Princesseuh merged 36 commits into
mainfrom
fix/html-mode-preserve-breaks
Sep 4, 2026
Merged

fix(printer): match Prettier's HTML printer#474
Princesseuh merged 36 commits into
mainfrom
fix/html-mode-preserve-breaks

Conversation

@Princesseuh

@Princesseuh Princesseuh commented Aug 19, 2026

Copy link
Copy Markdown
Member

Prettier's HTML formatting has a lot of quirk and edges on various constructs that we weren't properly copying when in HTML mode. A lot of the code here is essentially Prettier's HTML formatting utils modified to suit our AST and Astro-constructs in general.

@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b6080b2

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 Patch

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

@Princesseuh
Princesseuh force-pushed the fix/html-mode-preserve-breaks branch from 1b73f32 to 6639413 Compare August 19, 2026 01:59
@Princesseuh
Princesseuh marked this pull request as ready for review September 4, 2026 14:48
Comment thread .changeset/brave-eyes-smash.md Outdated
Comment thread .changeset/afraid-goats-yell.md Outdated

@ematipico ematipico left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't much about this part of the code. I left only a few nits

Comment thread src/printer/children.ts Outdated
Comment thread src/printer/utils.ts Outdated
Comment thread src/whitespace.ts
@Princesseuh
Princesseuh merged commit cc30d24 into main Sep 4, 2026
6 checks passed
@Princesseuh
Princesseuh deleted the fix/html-mode-preserve-breaks branch September 4, 2026 15:32
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

Successfully merging this pull request may close these issues.

2 participants