fix: Paragraphs lost in table cells

closes OLN-262
This commit is contained in:
Tom Moor
2024-02-20 20:58:46 -05:00
parent 5b1f36f2fc
commit 7c2a3142a4

View File

@@ -23,8 +23,8 @@ export default function sanitizeTables(turndownService: TurndownService) {
filter(node) {
return node.nodeName === "P" && inHtmlContext(node, "table");
},
replacement(content) {
return content.trim();
replacement(content, node) {
return content.trim() + (node.nextSibling ? "\\n" : "");
},
});
}