Skip to content

Commit

Permalink
Fix inline rendering for lists in live preview
Browse files Browse the repository at this point in the history
  • Loading branch information
reply2za committed Aug 17, 2024
1 parent 2768a95 commit 9d51874
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9d51874

Please sign in to comment.