Skip to content

fix: shallow render with fragment at top lvl - #331

Merged
rschristian merged 3 commits into
preactjs:mainfrom
immitsu:issue-262
May 8, 2024
Merged

fix: shallow render with fragment at top lvl#331
rschristian merged 3 commits into
preactjs:mainfrom
immitsu:issue-262

Conversation

@immitsu

@immitsu immitsu commented Jan 13, 2024

Copy link
Copy Markdown
Contributor

Fixes #262

@changeset-bot

changeset-bot Bot commented Jan 13, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 714c90e

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

This PR includes changesets to release 1 package
Name Type
preact-render-to-string 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

@remko79

This comment was marked as off-topic.

Comment thread src/pretty.js Outdated
Comment thread src/pretty.js Outdated
Comment thread src/pretty.js Outdated
@remko79

remko79 commented May 8, 2024

Copy link
Copy Markdown
Contributor

Not sure if I should put this here, but else I can move it to my issue. I think we should only add the check && nodeName !== Fragment on line 107 and omit other changes (except the updated test). The full diff based on current main branch is attached here.
diff.txt

immitsu and others added 3 commits May 8, 2024 13:14
Co-authored-by: Remko Klein <37383276+remko79@users.noreply.github.com>

@rschristian rschristian 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.

Thanks! Sorry for the delay.

@rschristian
rschristian merged commit e2c8fa1 into preactjs:main May 8, 2024
@github-actions github-actions Bot mentioned this pull request May 8, 2024
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.

Rendering shallow makes a Fragment into a <p>

3 participants