From 93bb1c485cd36f7187b1c5e7ac7372dc9eb19915 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 27 Feb 2025 16:23:26 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14208 --- app/src/protyle/util/insertHTML.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts index 790de1a6f..ceaf3e74b 100644 --- a/app/src/protyle/util/insertHTML.ts +++ b/app/src/protyle/util/insertHTML.ts @@ -395,7 +395,7 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false, // https://github.com/siyuan-note/siyuan/issues/14114 let heading2text = false; - if (isBlock && (editableElement.textContent.replace(Constants.ZWSP, "") !== "" || blockElement.getAttribute("data-type") === "NodeHeading") && + if ((editableElement.textContent.replace(Constants.ZWSP, "") !== "" || blockElement.getAttribute("data-type") === "NodeHeading") && tempElement.content.childElementCount === 1 && tempElement.content.firstChild.nodeType !== 3 && tempElement.content.firstElementChild.getAttribute("data-type") === "NodeHeading") {