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/12074

Vanessa73e2ce44e9b7
diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts
index 349d4bd3b5..528b90eed6 100644
--- a/app/src/protyle/wysiwyg/input.ts
+++ b/app/src/protyle/wysiwyg/input.ts
@@ -86,7 +86,8 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
brElement.remove();
}
- if (editElement.innerHTML.startsWith("》<wbr>") || editElement.innerHTML.indexOf("\n》<wbr>") > -1) {
+ if (type !== "NodeHeading" &&
+ (editElement.innerHTML.startsWith("》<wbr>") || editElement.innerHTML.indexOf("\n》<wbr>") > -1)) {
editElement.innerHTML = editElement.innerHTML.replace("》<wbr>", "><wbr>");
}
const trimStartText = editElement.innerHTML.trimStart();