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: fix https://github.com/siyuan-note/siyuan/issues/9534
Vanessafb220ae122bd
diff --git a/app/src/boot/globalEvent/keydown.ts b/app/src/boot/globalEvent/keydown.tsindex 87b8845628..0c66950ce9 100644--- a/app/src/boot/globalEvent/keydown.ts+++ b/app/src/boot/globalEvent/keydown.ts@@ -366,7 +366,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {const actionElementId = actionElement.getAttribute("data-node-id");if (range.toString() !== "") {getContentByInlineHTML(range, (content) => {- writeText(`((${actionElementId} "${Lute.EscapeHTMLStr(content.trim())}"))`);+ writeText(`((${actionElementId} "${content.trim()}"))`);});} else {fetchPost("/api/block/getRefText", {id: actionElementId}, (response) => {diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 3460f6bce2..bb365b6c0e 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -997,7 +997,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {if (selectText !== "") {// 和复制块引用保持一致 https://github.com/siyuan-note/siyuan/issues/9093getContentByInlineHTML(range, (content) => {- writeText(`${Lute.EscapeHTMLStr(content.trim())} ((${nodeElement.getAttribute("data-node-id")} "*"))`);+ writeText(`${content.trim()} ((${nodeElement.getAttribute("data-node-id")} "*"))`);});} else {nodeElement.setAttribute("data-reftext", "true");@@ -1036,14 +1036,13 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {} else {getContentByInlineHTML(range, (content) => {const oldHTML = topElement.outerHTML;- const name = Lute.EscapeHTMLStr(content.trim());const nameElement = topElement.lastElementChild.querySelector(".protyle-attr--name");if (nameElement) {- nameElement.innerHTML = `<svg><use xlink:href="#iconN"></use></svg>${name}`;+ nameElement.innerHTML = `<svg><use xlink:href="#iconN"></use></svg>${content.trim()}`;} else {- topElement.lastElementChild.insertAdjacentHTML("afterbegin", `<div class="protyle-attr--name"><svg><use xlink:href="#iconN"></use></svg>${name}</div>`);+ topElement.lastElementChild.insertAdjacentHTML("afterbegin", `<div class="protyle-attr--name"><svg><use xlink:href="#iconN"></use></svg>${content.trim()}</div>`);}- topElement.setAttribute("name", name);+ topElement.setAttribute("name", content.trim());updateTransaction(protyle, topElement.getAttribute("data-node-id"), topElement.outerHTML, oldHTML);});}