Skip to content

Commit 7231419

Browse files
committed
fix(slate) only remove nodes with a single empty text node
Signed-off-by: Jerome Simeon <[email protected]>
1 parent 28574e7 commit 7231419

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/markdown-slate/src/slateToCiceroMarkDom.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const removeEmptyParagraphs = (input) => {
2727
let nodesWithoutBlankParagraphs = [];
2828
input.nodes.forEach(node => {
2929
if (node.$class === 'org.accordproject.commonmark.Paragraph' &&
30+
node.nodes.length === 1 &&
3031
node.nodes[0].$class === 'org.accordproject.commonmark.Text' &&
3132
node.nodes[0].text === '') {
3233
return;

0 commit comments

Comments
 (0)