Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: fix https://github.com/siyuan-note/siyuan/issues/6009

Vanessa8ae585830282
diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts
index 6731292fc1..11a554ba6e 100644
--- a/app/src/layout/dock/index.ts
+++ b/app/src/layout/dock/index.ts
@@ -199,18 +199,6 @@ export class Dock {
}
});
break;
- // TODO: remove
- // case "backlink":
- // tab = new Tab({
- // callback(tab: Tab) {
- // tab.addModel(new Backlinks({
- // type: "pin",
- // tab,
- // blockId: editor?.protyle?.block?.rootID,
- // }));
- // }
- // });
- // break;
case "backlink":
tab = new Tab({
callback(tab: Tab) {
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index 1a0c9327a5..8bad79d9bc 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -484,10 +484,11 @@ export class Toolbar {
nextIndex = item.textContent.length;
nextElement.innerHTML = item.innerHTML + nextElement.innerHTML;
} else if (item.tagName !== "BR") {
+ if (item.getAttribute("data-type")?.indexOf("backslash") > -1 &&
+ item.firstChild?.textContent === "\\") {
+ item.firstChild.remove();
+ }
item.setAttribute("data-type", types.join(" "));
- item.querySelectorAll("span").forEach(backslashItem => {
- backslashItem.remove();
- });
setFontStyle(item, textObj);
newNodes.push(item);
} else {