An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/13871
Vanessa80af4ad06958
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.tsindex e2453e0147..e12375db83 100644--- a/app/src/protyle/toolbar/index.ts+++ b/app/src/protyle/toolbar/index.ts@@ -603,7 +603,15 @@ export class Toolbar {this.range.setEnd(startContainer.lastChild, startContainer.lastChild.textContent.length);afterElement.append(this.range.extractContents());startContainer.after(afterElement);- this.range.setStartBefore(afterElement);+ // https://github.com/siyuan-note/siyuan/issues/13871#issuecomment-2662855319+ const firstTypes = startContainer.getAttribute("data-type").split(" ");+ if (firstTypes.includes("code") || firstTypes.includes("tag") || firstTypes.includes("kbd")) {+ afterElement.insertAdjacentText("beforebegin", Constants.ZWSP + Constants.ZWSP);+ afterElement.insertAdjacentText("afterbegin", Constants.ZWSP);+ this.range.setStart(afterElement.previousSibling, 1);+ } else {+ this.range.setStartBefore(afterElement);+ }this.range.collapse(true);}for (let i = 0; i < newNodes.length; i++) {