diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index cbcecda2a..6c17443ef 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -48,7 +48,6 @@ import {activeBlur, renderTextMenu, showKeyboardToolbarUtil} from "../../mobile/ import {hideTooltip} from "../../dialog/tooltip"; import {appearanceMenu} from "../toolbar/Font"; import {setPosition} from "../../util/setPosition"; -import {avRender} from "../render/av/render"; import {emitOpenMenu} from "../../plugin/EventBus"; import {insertAttrViewBlockAnimation} from "../render/av/row"; import {avContextmenu, duplicateCompletely} from "../render/av/action"; diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.ts index 6b1e2ca82..728bf96b8 100644 --- a/app/src/protyle/render/av/blockAttr.ts +++ b/app/src/protyle/render/av/blockAttr.ts @@ -406,4 +406,4 @@ const openEdit = (protyle: IProtyle, element:HTMLElement, event: MouseEvent) => } target = target.parentElement; } -} +}; diff --git a/app/src/protyle/util/selection.ts b/app/src/protyle/util/selection.ts index b9518a046..85b6db3a4 100644 --- a/app/src/protyle/util/selection.ts +++ b/app/src/protyle/util/selection.ts @@ -613,7 +613,7 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar } else { // li 下面为 hr、嵌入块、数学公式、iframe、音频、视频、图表渲染块等时递归处理 if (element.classList.contains("li")) { - return focusBlock(element.querySelector('[data-node-id]'), parentElement, toStart); + return focusBlock(element.querySelector("[data-node-id]"), parentElement, toStart); } } return false; diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index f200ff3ed..68e26cced 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1336,9 +1336,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return true; } } - const isMatchList = matchHotKey(window.siyuan.config.keymap.editor.insert.list.custom, event) - const isMatchCheck = matchHotKey(window.siyuan.config.keymap.editor.insert.check.custom, event) - const isMatchOList = matchHotKey(window.siyuan.config.keymap.editor.insert["ordered-list"].custom, event) + const isMatchList = matchHotKey(window.siyuan.config.keymap.editor.insert.list.custom, event); + const isMatchCheck = matchHotKey(window.siyuan.config.keymap.editor.insert.check.custom, event); + const isMatchOList = matchHotKey(window.siyuan.config.keymap.editor.insert["ordered-list"].custom, event); if (isMatchList || isMatchOList || isMatchCheck) { const selectsElement: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select")); if (selectsElement.length === 0) { @@ -1346,8 +1346,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { protyle.hint.lastIndex = -1; protyle.hint.fill((isMatchCheck ? "* [ ] " : (isMatchList ? "* " : "1. ")) + Lute.Caret, protyle); } else if (selectsElement.length === 1) { - const subType = selectsElement[0].dataset.subtype - const type = selectsElement[0].dataset.type + const subType = selectsElement[0].dataset.subtype; + const type = selectsElement[0].dataset.type; if (type === "NodeParagraph") { turnsIntoOneTransaction({ protyle, @@ -1355,7 +1355,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { type: isMatchCheck ? "Blocks2TLs" : (isMatchList ? "Blocks2ULs" : "Blocks2OLs") }); } else if (type === "NodeList") { - const id = selectsElement[0].dataset.nodeId + const id = selectsElement[0].dataset.nodeId; if (subType === "o" && (isMatchList || isMatchCheck)) { turnsOneInto({ protyle, diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index e42cff9fa..490fb9557 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -1116,7 +1116,7 @@ export const turnsOneInto = async (options: { processRender(options.protyle.wysiwyg.element); highlightRender(options.protyle.wysiwyg.element); avRender(options.protyle.wysiwyg.element, options.protyle); -} +}; const updateRef = (protyle: IProtyle, id: string, index = 0) => { if (index > 6) {