From 20270f67e9c177e2ae55862c4fab711ae47e01b3 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 5 Sep 2023 09:39:57 +0800 Subject: [PATCH] :rotating_light: --- app/electron/main.js | 2 +- app/src/boot/globalEvent/click.ts | 2 +- app/src/boot/globalEvent/keydown.ts | 6 +++--- app/src/boot/globalEvent/keyup.ts | 2 +- app/src/menus/Menu.ts | 2 +- app/src/protyle/util/insertHTML.ts | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/electron/main.js b/app/electron/main.js index b3bfc3b87..7895dd333 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -822,7 +822,7 @@ app.whenReady().then(() => { }); }); } - }) + }); }); ipcMain.on("siyuan-send_windows", (event, data) => { BrowserWindow.getAllWindows().forEach(item => { diff --git a/app/src/boot/globalEvent/click.ts b/app/src/boot/globalEvent/click.ts index 9ca5d3f04..e727f120c 100644 --- a/app/src/boot/globalEvent/click.ts +++ b/app/src/boot/globalEvent/click.ts @@ -73,4 +73,4 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => { ) { currentPDFViewerObject.findBar.close(); } -} +}; diff --git a/app/src/boot/globalEvent/keydown.ts b/app/src/boot/globalEvent/keydown.ts index 5ba800dc0..05a630f6e 100644 --- a/app/src/boot/globalEvent/keydown.ts +++ b/app/src/boot/globalEvent/keydown.ts @@ -1308,10 +1308,10 @@ export const sendGlobalShortcut = (app: App) => { app.plugins.forEach(plugin => { plugin.commands.forEach(command => { if (command.globalCallback) { - hotkeys.push(command.customHotkey) + hotkeys.push(command.customHotkey); } - }) - }) + }); + }); ipcRenderer.send(Constants.SIYUAN_HOTKEY, { languages: window.siyuan.languages["_trayMenu"], id: getCurrentWindow().id, diff --git a/app/src/boot/globalEvent/keyup.ts b/app/src/boot/globalEvent/keyup.ts index 1c0e72857..5eb5a021a 100644 --- a/app/src/boot/globalEvent/keyup.ts +++ b/app/src/boot/globalEvent/keyup.ts @@ -115,4 +115,4 @@ export const windowKeyUp = (app: App,event:KeyboardEvent, switchDialog:Dialog) switchDialog = undefined; } } -} +}; diff --git a/app/src/menus/Menu.ts b/app/src/menus/Menu.ts index 1cef4a7a7..bd969df3c 100644 --- a/app/src/menus/Menu.ts +++ b/app/src/menus/Menu.ts @@ -253,7 +253,7 @@ export const bindMenuKeydown = (event: KeyboardEvent) => { || event.altKey || event.shiftKey || isCtrl(event)) { return false; } - const target = event.target as HTMLElement + const target = event.target as HTMLElement; if (window.siyuan.menus.menu.element.contains(target) && (target.tagName === "INPUT" || target.tagName === "TEXTAREA")) { return false; } diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts index 40b653ad0..f4b46a889 100644 --- a/app/src/protyle/util/insertHTML.ts +++ b/app/src/protyle/util/insertHTML.ts @@ -150,10 +150,10 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false, editableElement.innerHTML = replaceInnerHTML; } } - const editWbrElement = editableElement.querySelector("wbr") + const editWbrElement = editableElement.querySelector("wbr"); if (editWbrElement && editableElement && !trimStartText.endsWith("\n")) { // 数学公式后无换行,后期渲染后添加导致 rang 错误,中文输入错误 https://github.com/siyuan-note/siyuan/issues/9054 - const previousElement = hasPreviousSibling(editWbrElement) as HTMLElement + const previousElement = hasPreviousSibling(editWbrElement) as HTMLElement; if (previousElement && previousElement.nodeType !== 3 && previousElement.dataset.type.indexOf("inline-math") > -1 && !hasNextSibling(editWbrElement)) { editWbrElement.insertAdjacentText("afterend", "\n");