From b8ddf2277d8f2dd23cda121eb134de2f3c2aebb7 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 21 Sep 2022 15:23:49 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/insider/issues/1076 --- app/src/protyle/markdown/mathRender.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/markdown/mathRender.ts b/app/src/protyle/markdown/mathRender.ts index bb296ff37..45ad6208a 100644 --- a/app/src/protyle/markdown/mathRender.ts +++ b/app/src/protyle/markdown/mathRender.ts @@ -87,7 +87,9 @@ export const mathRender = (element: Element, cdn = Constants.PROTYLE_CDN, maxWid // 随着浏览器的升级,从 beforeend 修改为 afterend mathElement.insertAdjacentText("afterend", Constants.ZWSP); } - } else if (nextSibling && nextSibling.textContent !== "\n") { + } else if (nextSibling && nextSibling.textContent !== "\n" && + // 输入 $a$ 后,光标移动到其他块,再点击 a 后,光标不显示 https://github.com/siyuan-note/insider/issues/1076#issuecomment-1253215515 + nextSibling.textContent !== Constants.ZWSP) { // 数学公式后一个字符删除多 br https://ld246.com/article/1647157880974 // 数学公式后有 \n 不能再添加  https://ld246.com/article/1647329437541 mathElement.insertAdjacentHTML("beforeend", "");