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

Vanessaabb703216ec7
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index bc1184f15c..ea49d458fa 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -572,11 +572,11 @@ export class Toolbar {
types = [...new Set(types)];
if (types.includes("block-ref") && item.getAttribute("data-subtype") === "d") {
// https://github.com/siyuan-note/siyuan/issues/14299
- if (previousElement && previousElement.getAttribute("data-id") === item.getAttribute("data-id")) {
+ if (previousElement && previousElement.nodeType !== 3 && previousElement.getAttribute("data-id") === item.getAttribute("data-id")) {
previousElement.setAttribute("data-subtype", "s");
item.setAttribute("data-subtype", "s");
}
- if (nextElement && nextElement.getAttribute("data-id") === item.getAttribute("data-id")) {
+ if (nextElement && nextElement.nodeType !== 3 && nextElement.getAttribute("data-id") === item.getAttribute("data-id")) {
nextElement.setAttribute("data-subtype", "s");
item.setAttribute("data-subtype", "s");
}