From 9d51874748043011921b83602d9f8a92bc030278 Mon Sep 17 00:00:00 2001 From: Zain Date: Fri, 16 Aug 2024 23:38:30 -0400 Subject: [PATCH] Fix inline rendering for lists in live preview --- src/ui/render.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/render.ts b/src/ui/render.ts index 3e1667aa..016212c5 100644 --- a/src/ui/render.ts +++ b/src/ui/render.ts @@ -40,11 +40,11 @@ async function renderCompactMarkdownForInlineFieldLivePreview( ) { const tmpContainer = createSpan(); await MarkdownRenderer.render(app, markdown, tmpContainer, sourcePath, component); - let paragraph = tmpContainer.querySelector(":scope > p"); if (tmpContainer.childNodes.length == 1 && paragraph) { - container.replaceChildren(...paragraph.childNodes); + container.appendChild(paragraph.childNodes.item(paragraph.childNodes.length-1)); } else { + console.log("B"); container.replaceChildren(...tmpContainer.childNodes); }