From 72314190b243d98fd6a3b985ada25ad719464b80 Mon Sep 17 00:00:00 2001 From: Jerome Simeon Date: Mon, 16 Dec 2019 23:35:48 -0500 Subject: [PATCH] fix(slate) only remove nodes with a single empty text node Signed-off-by: Jerome Simeon --- packages/markdown-slate/src/slateToCiceroMarkDom.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/markdown-slate/src/slateToCiceroMarkDom.js b/packages/markdown-slate/src/slateToCiceroMarkDom.js index 1c91e0d3..2083ef8e 100644 --- a/packages/markdown-slate/src/slateToCiceroMarkDom.js +++ b/packages/markdown-slate/src/slateToCiceroMarkDom.js @@ -27,6 +27,7 @@ const removeEmptyParagraphs = (input) => { let nodesWithoutBlankParagraphs = []; input.nodes.forEach(node => { if (node.$class === 'org.accordproject.commonmark.Paragraph' && + node.nodes.length === 1 && node.nodes[0].$class === 'org.accordproject.commonmark.Text' && node.nodes[0].text === '') { return;