From 8f9f075cdbde79073de7dc7e493e687c3e31385e Mon Sep 17 00:00:00 2001 From: sub-hub Date: Mon, 6 May 2024 14:04:00 +0900 Subject: [PATCH] Fix: Markdown Nodes Inherit inline styles --- src/ts/util.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ts/util.ts b/src/ts/util.ts index 1b16d57d..5f44c7bd 100644 --- a/src/ts/util.ts +++ b/src/ts/util.ts @@ -573,6 +573,12 @@ export function applyMarkdownToNode(node: Node) { if (markdown !== text) { const span = document.createElement('span'); span.innerHTML = markdown; + + // inherit inline style from the parent node + const parentStyle = (node.parentNode as HTMLElement).style; + for(let i=0;i