-
Notifications
You must be signed in to change notification settings - Fork 766
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
Parse white space according to the HTML spec #2729
Conversation
🦋 Changeset detectedLatest commit: 1a8762e The changes in this PR will be included in the next version bump. This PR includes changesets to release 50 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
<div>
normal:
<div style='white-space: normal'>hello one two
three
four
</div>
<br/>
nowrap:
<div style='white-space: nowrap'>hello one two
three
four
</div>
<br/>
</div> When I paste this HTML, there is no line break between ' |
@jkcs Nicely spotted! Technically, this isn't a fault in the white space parsing, but due to the fact that Plate's HTML deserializer ignores block elements that it doesn't understand (in this case, the Still, it might be worth addressing in a separate PR. The rule might be something like: If you encounter a block HTML element that doesn't map to a Slate node at the end of an inline formatting context, insert a newline at the end of the preceeding inline formatting context. Since this logic depends on the plugin system, it would need to be placed somewhere in the old |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modified the changeset to patch, next step is to modify v25 changelog to include this major change.
@zbeyens Assuming that needs to happen after merge and the release of 25.0.1, I think we're ready to merge this. |
Description
Fixes #2713