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

Vanessa4aa0724224d3
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index 5519a7da20..31d2f04df1 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -646,13 +646,12 @@ export class Toolbar {
(currentNode.getAttribute("data-inline-memo-content") || ""));
}
}
+ startContainer = currentNode;
if (currentType.includes("inline-math")) {
- startContainer = currentNode;
startOffset = null;
} else {
if (i === newNodes.length) {
endOffset = previousElement.textContent.length;
- startContainer = currentNode;
} else {
startOffset = previousElement.textContent.length;
}