Skip to content

Fixes line breaks in paragraphs #4223

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

martin-lysk
Copy link
Collaborator

@martin-lysk martin-lysk commented Apr 16, 2025

This pr introduces a serailization that allows to serailize whitespaces comming from plate lossless into markdown.

Markdown whitespace handling is a beast - two \n represent a paragraph but following ones get collapsed.

Mardkown Gets rendered as
Hello



new paragraph

Hello

new paragraph

empty paragraph paragraph with one softbreak paragraph with two softbreak

Hello


new paragraph

Hello


new paragraph

Hello



new paragraph

Hello

<br />

new paragraph
Hello

<p><br /></p>

new paragraph
Hello

\
<br />

new paragraph

Checklist

  • yarn typecheck
  • yarn lint:fix
  • yarn test
  • yarn brl
  • yarn changeset
  • ui changelog

Copy link

codesandbox bot commented Apr 16, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Apr 16, 2025

🦋 Changeset detected

Latest commit: 4ad877f

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

This PR includes changesets to release 2 packages
Name Type
@udecode/plate-markdown Patch
@udecode/plate-ai 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

Copy link

vercel bot commented Apr 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ❌ Failed (Inspect) Apr 16, 2025 3:59pm

@martin-lysk martin-lysk marked this pull request as ready for review April 16, 2025 13:27
@martin-lysk martin-lysk marked this pull request as ready for review April 16, 2025 15:52
@martin-lysk martin-lysk marked this pull request as draft April 17, 2025 08:55
@martin-lysk
Copy link
Collaborator Author

This PR is still in draft - see discussion https://discord.com/channels/1026227597115396188/1080907882960277566/1361294241975767110

@12joan
Copy link
Collaborator

12joan commented Apr 17, 2025

Test

 

Test



Test


 

Test

X
Y

Test

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