From f2b2079972b1267ae6ab24847e57312b968d0b38 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 30 Sep 2022 10:54:54 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6018 --- app/src/protyle/wysiwyg/enter.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.ts index b28a0f5fc..6a1e50c07 100644 --- a/app/src/protyle/wysiwyg/enter.ts +++ b/app/src/protyle/wysiwyg/enter.ts @@ -151,6 +151,7 @@ const listEnter = (protyle: IProtyle, blockElement: HTMLElement, range: Range) = selectNode.firstChild.remove(); } // https://github.com/siyuan-note/siyuan/issues/3850 + // https://github.com/siyuan-note/siyuan/issues/6018 if ((editableElement?.lastElementChild?.getAttribute("data-type") || "").indexOf("inline-math") > -1 && !hasNextSibling(editableElement?.lastElementChild)) { editableElement.insertAdjacentText("beforeend", "\n"); @@ -363,6 +364,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle selectNode.firstChild.remove(); } // https://github.com/siyuan-note/siyuan/issues/3850 + // https://github.com/siyuan-note/siyuan/issues/6018 if ((editableElement?.lastElementChild?.getAttribute("data-type") || "").indexOf("inline-math") > -1 && !hasNextSibling(editableElement?.lastElementChild)) { editableElement.insertAdjacentText("beforeend", "\n");