Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(react): \n not converted to <br /> #61

Merged
merged 3 commits into from
Jan 13, 2022
Merged

fix(react): \n not converted to <br /> #61

merged 3 commits into from
Jan 13, 2022

Conversation

jpedroschmitz
Copy link
Contributor

This PR fixes an issue where \n wasn't converted to <br />.

Important notes:

  • The &NoBreak; entity will still show up, but it's not relevant.
  • If the parent node is a code block, the text won't be serialized, as it can break the content.

@jpedroschmitz jpedroschmitz added the react-renderer Issues and PR's related to @graphcms/rich-text-react-renderer label Jan 11, 2022
@jpedroschmitz jpedroschmitz self-assigned this Jan 11, 2022
@changeset-bot
Copy link

changeset-bot bot commented Jan 11, 2022

🦋 Changeset detected

Latest commit: 63db974

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

This PR includes changesets to release 1 package
Name Type
@graphcms/rich-text-react-renderer 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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2022

size-limit report 📦

Path Size
packages/react-renderer/dist/rich-text-react-renderer.cjs.production.min.js 5.13 KB (+2.87% 🔺)
packages/react-renderer/dist/rich-text-react-renderer.esm.js 5.09 KB (+2.77% 🔺)
packages/types/dist/rich-text-types.cjs.production.min.js 51 B (0%)
packages/types/dist/rich-text-types.esm.js 64 B (0%)

@jpedroschmitz jpedroschmitz changed the title fix(react): \n is not converted to <br /> fix(react): \n not converted to <br /> Jan 13, 2022
@jpedroschmitz jpedroschmitz merged commit 2f3c345 into main Jan 13, 2022
@jpedroschmitz jpedroschmitz deleted the line-break branch January 13, 2022 12:55
@github-actions github-actions bot mentioned this pull request Jan 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
react-renderer Issues and PR's related to @graphcms/rich-text-react-renderer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants