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 |
zbeyens
left a comment
There was a problem hiding this comment.
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