Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/5667

Vanessa54ac25cf6de3
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index c112a9cdd9..2d6d26ba73 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -100,6 +100,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
textHTML = "";
}
+ // 剪切复制中首位包含空格或仅有空格 https://github.com/siyuan-note/siyuan/issues/5667
if (!textHTML.endsWith(Constants.ZWSP) && !textHTML.startsWith(Constants.ZWSP)) {
// process word
const doc = new DOMParser().parseFromString(textHTML, "text/html");