Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Preserve whitespace for pre/textarea when pretty-printing#432

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@nwalters512
Copy link
Contributor

<pre> and<textarea> are whitespace-sensitive. When pretty-printing, it's important to not inject extra whitespace when rendering them.

There may be more tags for which whitespace should be preserved; these are the two that I specifically know about.

Disclosure: I wrote the tests by hand and used GPT-5-Codex to help with the implementation.

@changeset-bot
Copy link

changeset-botbot commentedSep 30, 2025
edited
Loading

🦋 Changeset detected

Latest commit:96dfd13

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

This PR includes changesets to release 1 package
NameType
preact-render-to-stringPatch

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

Copy link
Member

@rschristianrschristian left a comment

Choose a reason for hiding this comment

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

Seems reasonable but I'm a bit worried this might break folks using pretty printing in their test suites and the like. Pretty specific tags & change scenarios though, so perhaps the risk is low

nwalters512 reacted with thumbs up emoji
@rschristianrschristian merged commit69ed337 intopreactjs:mainSep 30, 2025
1 check passed
@github-actionsgithub-actionsbot mentioned this pull requestSep 30, 2025
@nwalters512nwalters512 deleted the pretty-format-preserve-whitespace branchOctober 1, 2025 01:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@rschristianrschristianrschristian approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@nwalters512@rschristian

[8]ページ先頭

©2009-2025 Movatter.jp