diff --git a/app/src/ai/actions.ts b/app/src/ai/actions.ts
index a906cb086..abc46a4a6 100644
--- a/app/src/ai/actions.ts
+++ b/app/src/ai/actions.ts
@@ -251,7 +251,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
let target = event.target as HTMLElement;
while (target && !target.isSameNode(element)) {
if (target.classList.contains("b3-list-item__action")) {
- const subItem = window.siyuan.storage[Constants.LOCAL_AI][target.parentElement.dataset.index]
+ const subItem = window.siyuan.storage[Constants.LOCAL_AI][target.parentElement.dataset.index];
editDialog(subItem.name, subItem.memo);
menu.close();
event.stopPropagation();
diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts
index da21bf9b4..b0b86ba37 100644
--- a/app/src/block/popover.ts
+++ b/app/src/block/popover.ts
@@ -139,7 +139,7 @@ export const initBlockPopover = (app: App) => {
const hidePopover = (event: MouseEvent & { path: HTMLElement[] }) => {
// pad 端点击后 event.target 不会更新。
- const target = isTouchDevice() ? document.elementFromPoint(event.clientX, event.clientY) : event.target as HTMLElement
+ const target = isTouchDevice() ? document.elementFromPoint(event.clientX, event.clientY) : event.target as HTMLElement;
if (!target) {
return false;
}
diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts
index b10998479..85521920f 100644
--- a/app/src/card/openCard.ts
+++ b/app/src/card/openCard.ts
@@ -673,7 +673,7 @@ const emitEvent = (app: App, card: ICard, type: string) => {
export const openCard = (app: App) => {
if (window.siyuan.config.readonly) {
- return
+ return;
}
fetchPost("/api/riff/getRiffDueCards", {deckID: ""}, (cardsResponse) => {
openCardByData(app, cardsResponse.data, "all");
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts
index 1f07b3ff6..38d69002c 100644
--- a/app/src/dialog/processSystem.ts
+++ b/app/src/dialog/processSystem.ts
@@ -295,10 +295,10 @@ export const refreshFileTree = (cb?: () => void) => {
setStorageVal(Constants.LOCAL_FILEPOSITION, window.siyuan.storage[Constants.LOCAL_FILEPOSITION]);
fetchPost("/api/filetree/refreshFiletree", {}, () => {
if (cb) {
- cb()
+ cb();
}
});
-}
+};
let statusTimeout: number;
export const progressStatus = (data: IWebSocketData) => {
diff --git a/app/src/editor/rename.ts b/app/src/editor/rename.ts
index 392e44d10..edf6fb8c0 100644
--- a/app/src/editor/rename.ts
+++ b/app/src/editor/rename.ts
@@ -139,10 +139,10 @@ export const renameAsset = (assetPath: string) => {
if (item.path === assetPath) {
item.parent.updateTitle(getDisplayName(response.data.newPath));
}
- })
+ });
getAllEditor().forEach(item => {
item.reload(false);
- })
+ });
});
});
};
diff --git a/app/src/emoji/index.ts b/app/src/emoji/index.ts
index 82b7962ff..2579d0935 100644
--- a/app/src/emoji/index.ts
+++ b/app/src/emoji/index.ts
@@ -518,7 +518,7 @@ export const getEmojiDesc = (emoji: IEmojiItem) => {
return emoji.description_ja_jp;
}
return emoji.description;
-}
+};
export const getEmojiTitle = (index: number) => {
diff --git a/app/src/layout/dock/Graph.ts b/app/src/layout/dock/Graph.ts
index 3d8874485..95c1f94b6 100644
--- a/app/src/layout/dock/Graph.ts
+++ b/app/src/layout/dock/Graph.ts
@@ -322,11 +322,11 @@ export class Graph extends Model {
this.searchGraph(false, undefined, true);
} else if (dataType === "fullscreen") {
fullscreen(this.element, target);
- const minElement = this.element.querySelector('.block__icons .block__icon[data-type="min"]')
+ const minElement = this.element.querySelector('.block__icons .block__icon[data-type="min"]');
if (this.element.className.includes("fullscreen")) {
- minElement.classList.add("fn__none")
+ minElement.classList.add("fn__none");
} else {
- minElement.classList.remove("fn__none")
+ minElement.classList.remove("fn__none");
}
}
break;
diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts
index 35c3156d5..aa727f25f 100644
--- a/app/src/layout/dock/Outline.ts
+++ b/app/src/layout/dock/Outline.ts
@@ -379,7 +379,7 @@ export class Outline extends Model {
if ((item.action === "update" || item.action === "insert") &&
(item.data.indexOf('data-type="NodeHeading"') > -1 || item.data.indexOf(`
`) > -1)) {
needReload = true;
- return true
+ return true;
} else if (item.action === "delete" || item.action === "move") {
needReload = true;
return true;
diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts
index a815c2cbe..139589149 100644
--- a/app/src/layout/dock/index.ts
+++ b/app/src/layout/dock/index.ts
@@ -455,7 +455,7 @@ export class Dock {
return;
}
// 关系图全屏不应该退出 & https://github.com/siyuan-note/siyuan/issues/11775
- const fullscreenElement = this.layout.element.querySelector(".fullscreen")
+ const fullscreenElement = this.layout.element.querySelector(".fullscreen");
if (fullscreenElement && fullscreenElement.clientHeight > 0) {
return;
}
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index bad0afb1f..501997ca5 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -654,7 +654,7 @@ export const contentMenu = (protyle: IProtyle, nodeElement: Element) => {
protyle.toolbar.showContent(protyle, range, nodeElement);
/// #else
const oldHTML = nodeElement.outerHTML;
- const id = nodeElement.getAttribute("data-node-id")
+ const id = nodeElement.getAttribute("data-node-id");
if (range.toString() !== "" || (range.cloneContents().childNodes[0] as HTMLElement)?.classList?.contains("emoji")) {
window.siyuan.menus.menu.append(new MenuItem({
icon: "iconCopy",
@@ -1632,7 +1632,7 @@ export const inlineMathMenu = (protyle: IProtyle, element: Element) => {
y: rect.top + 26,
h: 26
});
-}
+};
const genImageWidthMenu = (label: string, assetElement: HTMLElement, imgElement: HTMLElement, protyle: IProtyle, id: string, nodeElement: HTMLElement, html: string) => {
return {
@@ -1874,7 +1874,7 @@ export const tableMenu = (protyle: IProtyle, nodeElement: Element, cellElement:
}
});
const menus: IMenu[] = [];
- menus.push(...otherMenus)
+ menus.push(...otherMenus);
menus.push({
type: "separator"
});
@@ -1950,7 +1950,7 @@ export const tableMenu = (protyle: IProtyle, nodeElement: Element, cellElement:
return true;
}
});
- const insertMenus = []
+ const insertMenus = [];
insertMenus.push({
icon: "iconBefore",
label: window.siyuan.languages.insertRowAbove,
@@ -1989,8 +1989,8 @@ export const tableMenu = (protyle: IProtyle, nodeElement: Element, cellElement:
}
});
}
- menus.push(...insertMenus)
- const other2Menus: IMenu[] = []
+ menus.push(...insertMenus);
+ const other2Menus: IMenu[] = [];
if (((!hasNone || (hasNone && !hasRowSpan && hasColSpan)) &&
(!previousHasNone || (previousHasNone && !previousHasRowSpan && previousHasColSpan))) ||
((!hasNone || (hasNone && !hasRowSpan && hasColSpan)) &&
@@ -2052,7 +2052,7 @@ export const tableMenu = (protyle: IProtyle, nodeElement: Element, cellElement:
type: "separator"
});
}
- const removeMenus = []
+ const removeMenus = [];
if (cellElement.parentElement.parentElement.tagName !== "THEAD" &&
((!hasNone && !hasRowSpan) || (hasNone && !hasRowSpan && hasColSpan))) {
removeMenus.push({
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 9bde8c155..83cb2afbe 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -23,7 +23,6 @@ import {focusBlock, focusByRange, getEditorRange} from "../util/selection";
import {hideElements} from "../ui/hideElements";
import {highlightRender} from "../render/highlightRender";
import {blockRender} from "../render/blockRender";
-import {removeEmbed} from "../wysiwyg/removeEmbed";
import {getContenteditableElement, getTopAloneElement, isNotEditBlock} from "../wysiwyg/getBlock";
import * as dayjs from "dayjs";
import {fetchPost} from "../../util/fetch";
@@ -90,24 +89,24 @@ export class Gutter {
selectElements.push(item);
});
} else {
- const gutterId = buttonElement.getAttribute("data-node-id")
+ const gutterId = buttonElement.getAttribute("data-node-id");
selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
let selectedIncludeGutter = false;
selectElements.forEach((item => {
- const itemId = item.getAttribute("data-node-id")
+ const itemId = item.getAttribute("data-node-id");
if (itemId === gutterId) {
- selectedIncludeGutter = true
+ selectedIncludeGutter = true;
}
selectIds.push(itemId);
- }))
+ }));
if (!selectedIncludeGutter) {
- const gutterNodeElement = protyle.wysiwyg.element.querySelector(`[data-node-id="${gutterId}"]`)
+ const gutterNodeElement = protyle.wysiwyg.element.querySelector(`[data-node-id="${gutterId}"]`);
if (gutterNodeElement) {
selectElements.forEach((item => {
- item.classList.remove("protyle-wysiwyg--select")
+ item.classList.remove("protyle-wysiwyg--select");
}));
- gutterNodeElement.classList.add("protyle-wysiwyg--select")
- selectElements = [gutterNodeElement]
+ gutterNodeElement.classList.add("protyle-wysiwyg--select");
+ selectElements = [gutterNodeElement];
selectIds = [gutterId];
}
}
diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts
index c8dffef78..d006f1d25 100644
--- a/app/src/protyle/header/Title.ts
+++ b/app/src/protyle/header/Title.ts
@@ -115,7 +115,7 @@ export class Title {
event.stopPropagation();
}
} else if (event.key === "Enter") {
- const editElment = getContenteditableElement(protyle.wysiwyg.element.firstElementChild)
+ const editElment = getContenteditableElement(protyle.wysiwyg.element.firstElementChild);
if (editElment && editElment.textContent === "" && !protyle.wysiwyg.element.firstElementChild.classList.contains("av")) {
// 配合提示文本使用,避免提示文本挤压到第二个块中
focusBlock(protyle.wysiwyg.element.firstElementChild, protyle.wysiwyg.element);
diff --git a/app/src/protyle/render/av/row.ts b/app/src/protyle/render/av/row.ts
index 77f24b845..ae70cabfe 100644
--- a/app/src/protyle/render/av/row.ts
+++ b/app/src/protyle/render/av/row.ts
@@ -132,7 +132,7 @@ ${getTypeByCellElement(item) === "block" ? ' data-detached="true"' : ""}> {
- const blockCellElement = blockElement.querySelector(`[data-block-id="${id}"]`)
+ const blockCellElement = blockElement.querySelector(`[data-block-id="${id}"]`);
if (!blockCellElement) {
html += `
${colHTML}
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 1b8ca5646..5db2c836b 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -750,7 +750,7 @@ export class WYSIWYG {
this.element.querySelectorAll("iframe").forEach(item => {
item.style.pointerEvents = "none";
});
- const needScroll = ["IMG", "VIDEO", "AUDIO"].includes(target.tagName) || target.classList.contains("img")
+ const needScroll = ["IMG", "VIDEO", "AUDIO"].includes(target.tagName) || target.classList.contains("img");
documentSelf.onmousemove = (moveEvent: MouseEvent) => {
const moveTarget = moveEvent.target as HTMLElement;
// table cell select
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 1cf547071..852d48155 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -1182,7 +1182,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
// h1 - h6 hotkey
if (matchHotKey(window.siyuan.config.keymap.editor.heading.paragraph.custom, event)) {
- const selectsElement = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"))
+ const selectsElement = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
if (selectsElement.length === 0) {
selectsElement.push(nodeElement);
}
diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts
index cfb6f1f74..e206325b2 100644
--- a/app/src/protyle/wysiwyg/remove.ts
+++ b/app/src/protyle/wysiwyg/remove.ts
@@ -251,7 +251,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran
if (previousElement) {
if (previousElement.classList.contains("p") && getContenteditableElement(previousElement).textContent === "") {
// 空块向后删除时移除改块 https://github.com/siyuan-note/siyuan/issues/11732
- const ppElement = getPreviousBlock(previousElement)
+ const ppElement = getPreviousBlock(previousElement);
transaction(protyle, [{
action: "delete",
id: previousElement.getAttribute("data-node-id"),
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index 955c27952..a9c9f81cb 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -1144,7 +1144,7 @@ export const transaction = (protyle: IProtyle, doOperations: IOperation[], undoO
});
}
});
- })
+ });
return;
}
if (needDebounce) {
@@ -1166,10 +1166,10 @@ export const transaction = (protyle: IProtyle, doOperations: IOperation[], undoO
// 插入块后会导致高度变化,从而产生再次定位 https://github.com/siyuan-note/siyuan/issues/11798
doOperations.find(item => {
if (item.action === "insert") {
- protyle.observerLoad?.disconnect()
+ protyle.observerLoad?.disconnect();
return true;
}
- })
+ });
};
const processFold = (operation: IOperation, protyle: IProtyle) => {
@@ -1225,7 +1225,7 @@ const processFold = (operation: IOperation, protyle: IProtyle) => {
}
return;
}
-}
+};
export const updateTransaction = (protyle: IProtyle, id: string, newHTML: string, html: string) => {
if (newHTML === html) {