Skip to content

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

:rotating_light:

Vanessad8d9ff3b2651
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index a069cf9069..e5b9698280 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -1045,7 +1045,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
});
textElements[2].value = imgElement.getAttribute("alt") || "";
element.addEventListener("click", (event) => {
- let target = event.target as HTMLElement
+ let target = event.target as HTMLElement;
while (target) {
if (target.dataset.action === "copy") {
writeText((target.parentElement.nextElementSibling as HTMLTextAreaElement).value);
@@ -1054,7 +1054,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
}
target = target.parentElement;
}
- })
+ });
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
@@ -1449,7 +1449,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
});
element.addEventListener("click", (event) => {
- let target = event.target as HTMLElement
+ let target = event.target as HTMLElement;
while (target) {
if (target.dataset.action === "copy") {
writeText((target.parentElement.nextElementSibling as HTMLTextAreaElement).value);
@@ -1458,7 +1458,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
}
target = target.parentElement;
}
- })
+ });
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index 02128e873a..21d7d31b69 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -434,7 +434,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
});
} else {
// 修改表格名 avID 传入到 id 上了 https://github.com/siyuan-note/siyuan/issues/12724
- const avID = operation.action === "setAttrViewName" ? operation.id : operation.avID
+ const avID = operation.action === "setAttrViewName" ? operation.id : operation.avID;
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${avID}"]`)).forEach((item: HTMLElement) => {
item.removeAttribute("data-render");
const updateRow = item.querySelector('.av__row[data-need-update="true"]');
diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.ts
index bd960a513e..0824e8a171 100644
--- a/app/src/protyle/wysiwyg/enter.ts
+++ b/app/src/protyle/wysiwyg/enter.ts
@@ -249,7 +249,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
const undoOperation: IOperation[] = [];
let currentElement = blockElement;
// 回车之前的块为 1\n\n2 时会产生多个块
- const selectsElement: Element[] = []
+ const selectsElement: Element[] = [];
Array.from(enterElement.children).forEach((item: HTMLElement) => {
if (item.dataset.nodeId === id) {
blockElement.before(item);
@@ -303,7 +303,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
currentElement = item;
selectsElement.push(item);
});
- const parentElement = currentElement.parentElement
+ const parentElement = currentElement.parentElement;
transaction(protyle, doOperation, undoOperation);
if (parentElement.classList.contains("sb") && parentElement.getAttribute("data-sb-layout") === "col") {
turnsIntoOneTransaction({