Insert newlines when unrecognised block element breaks up an inline formatting context #4352
12joan
started this conversation in
Feature Requests
Replies: 1 comment
-
Another case that should be handled: Also, asymmetrical cases: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Reported by @jkcs: #2729 (comment)
When deserializing HTML and an unrecognised HTML block element breaks up an inline formatting context, newlines should be inserted to ensure that the contents of the block element appear on separate lines to the inline formatting contexts either side of it.
Steps to Reproduce
Expected Behavior
The resulting text node should contain
"One\ntwo\nthree"
to match the standard browser behaviour.Note that the newline preceeding the block should only be added if the block is preceeded by a non-empty inline formatting context. Likewise, the newline following the block should only be added if the block is followed by a non-empty inline formatting context.
If the HTML block element has been successfully parsed to a Slate node, no newlines need be added.
Bounty
Click here to add a bounty via Algora.
Funding
Beta Was this translation helpful? Give feedback.
All reactions