From 09ea73f4ff9be02a23ea3ee8158a9c3e0d4289ca Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 29 Aug 2022 11:10:49 +0800 Subject: [PATCH] :bug: https://github.com/siyuan-note/siyuan/issues/5746 --- app/src/protyle/wysiwyg/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 3f80f6b10..335edb4a5 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -345,7 +345,8 @@ export class WYSIWYG { setFold(protyle, headElement, undefined, true); } else { if ((headElement.parentElement.childElementCount === 3 && headElement.parentElement.classList.contains("li")) || - (headElement.parentElement.childElementCount === 2 && (headElement.parentElement.classList.contains("bq") || headElement.parentElement.classList.contains("sb")))) { + (headElement.parentElement.childElementCount === 2 && (headElement.parentElement.classList.contains("bq") || headElement.parentElement.classList.contains("sb"))) || + (headElement.parentElement.childElementCount === 1 && headElement.parentElement.classList.contains("protyle-wysiwyg"))) { // https://github.com/siyuan-note/siyuan/issues/4040 const emptyId = Lute.NewNodeID(); const emptyElement = genEmptyElement(false, false, emptyId);