Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/12273

Vanessa8ff299c1ebc7
diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.ts
index 84e082e1b3..f3a25bbd25 100644
--- a/app/src/protyle/wysiwyg/enter.ts
+++ b/app/src/protyle/wysiwyg/enter.ts
@@ -495,6 +495,14 @@ const listEnter = (protyle: IProtyle, blockElement: HTMLElement, range: Range) =
selectNode.firstChild.after(document.createElement("wbr"));
selectNode.firstChild.remove();
}
+ if (selectNode.textContent === Constants.ZWSP) {
+ // https://github.com/siyuan-note/siyuan/issues/12273
+ selectNode.childNodes.forEach(item => {
+ if (item.nodeType === 3 && item.textContent === Constants.ZWSP) {
+ item.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 &&