diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index 6ec542d15..65f8448d7 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -451,9 +451,9 @@ export const resizeTabs = () => { models.backlink.forEach(item => { const mTreeElement = item.element.querySelector(".backlinkMList") as HTMLElement; if (mTreeElement.style.height && mTreeElement.style.height !== "0px") { - mTreeElement.style.height = (item.element.clientHeight - mTreeElement.previousElementSibling.clientHeight * 2) + "px" + mTreeElement.style.height = (item.element.clientHeight - mTreeElement.previousElementSibling.clientHeight * 2) + "px"; } - }) + }); pdfResize(); }, 200); }; diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts index 60d7140c4..c1b6dda41 100644 --- a/app/src/mobile/util/initFramework.ts +++ b/app/src/mobile/util/initFramework.ts @@ -103,7 +103,7 @@ export const initFramework = () => { editIconElement.setAttribute("xlink:href", "#iconPreview"); } editElement.addEventListener(getEventName(), () => { - const isReadonly = editIconElement.getAttribute("xlink:href") === "#iconPreview" + const isReadonly = editIconElement.getAttribute("xlink:href") === "#iconPreview"; window.siyuan.config.editor.readOnly = isReadonly; fetchPost("/api/setting/setEditor", window.siyuan.config.editor, () => { if (!isReadonly) { @@ -115,7 +115,7 @@ export const initFramework = () => { inputElement.readOnly = true; editIconElement.setAttribute("xlink:href", "#iconEdit"); } - }) + }); }); scrimElement.addEventListener(getEventName(), () => { diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index 7a6c59173..bf0e48aae 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -385,7 +385,7 @@ const renderPDF = (id: string) => { window.siyuan.printWin.once("ready-to-show", () => { // 导出 PDF 预览界面不受主界面缩放影响 https://github.com/siyuan-note/siyuan/issues/6262 window.siyuan.printWin.webContents.setZoomFactor(1); - }) + }); fetchPost("/api/export/exportTempContent", {content: html}, (response) => { window.siyuan.printWin.loadURL(response.data.url); }); diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index 50a91926e..ebf4d86da 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -1200,7 +1200,7 @@ export class Gutter { id, attrs: {breadcrumb: inputElement.checked.toString()} }); - nodeElement.removeAttribute("data-render") + nodeElement.removeAttribute("data-render"); blockRender(protyle, nodeElement); window.siyuan.menus.menu.remove(); }); diff --git a/app/src/protyle/markdown/blockRender.ts b/app/src/protyle/markdown/blockRender.ts index e3049e8ce..e3cf42be9 100644 --- a/app/src/protyle/markdown/blockRender.ts +++ b/app/src/protyle/markdown/blockRender.ts @@ -28,9 +28,9 @@ export const blockRender = (protyle: IProtyle, element: Element) => { const content = Lute.UnEscapeHTMLStr(item.getAttribute("data-content")); let breadcrumb: boolean | string = item.getAttribute("breadcrumb"); if (breadcrumb) { - breadcrumb = breadcrumb === "true" + breadcrumb = breadcrumb === "true"; } else { - breadcrumb = window.siyuan.config.editor.embedBlockBreadcrumb + breadcrumb = window.siyuan.config.editor.embedBlockBreadcrumb; } fetchPost("/api/search/searchEmbedBlock", { embedBlockID: item.getAttribute("data-node-id"), diff --git a/app/src/protyle/toolbar/Font.ts b/app/src/protyle/toolbar/Font.ts index f3adea545..b657c3c15 100644 --- a/app/src/protyle/toolbar/Font.ts +++ b/app/src/protyle/toolbar/Font.ts @@ -158,7 +158,7 @@ export const setFontStyle = (textElement: HTMLElement, textOption: ITextOption) textElement.innerText = blockRefData[2]; }; const setLink = (textOption: string) => { - const options = textOption.split(Constants.ZWSP) + const options = textOption.split(Constants.ZWSP); textElement.setAttribute("data-href", options[0]); textElement.removeAttribute("data-subtype"); textElement.removeAttribute("data-id"); diff --git a/app/src/protyle/toolbar/Link.ts b/app/src/protyle/toolbar/Link.ts index bce6ed2a3..fff67c79e 100644 --- a/app/src/protyle/toolbar/Link.ts +++ b/app/src/protyle/toolbar/Link.ts @@ -39,7 +39,7 @@ export class Link extends ToolbarItem { dataHref = clipText; } else { // 360 - const lastSpace = clipText.lastIndexOf(' ') + const lastSpace = clipText.lastIndexOf(" "); if (lastSpace > -1) { if (protyle.lute.IsValidLinkDest(clipText.substring(lastSpace))) { dataHref = clipText.substring(lastSpace); diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index bfccf4856..d59e36331 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -51,7 +51,7 @@ export const pasteAsPlainText = async (protyle:IProtyle) => { writeText(""); } else { protyle.lute.SetHTMLTag2TextMark(true); // 临时设置 Lute 解析参数,行级元素键盘和下划线无法粘贴为纯文本 https://github.com/siyuan-note/siyuan/issues/6220 - const dom = protyle.lute.InlineMd2BlockDOM(clipboard.readText()) + const dom = protyle.lute.InlineMd2BlockDOM(clipboard.readText()); protyle.lute.SetHTMLTag2TextMark(false); insertHTML(protyle.lute.BlockDOM2Content(dom), protyle, false); } diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.ts index 4c42b5845..e7096ab01 100644 --- a/app/src/util/Tree.ts +++ b/app/src/util/Tree.ts @@ -74,7 +74,7 @@ export class Tree { if (item.count) { countHTML = `${item.count}`; } - const hasChild = (item.children && item.children.length > 0) || (item.blocks && item.blocks.length > 0) + const hasChild = (item.children && item.children.length > 0) || (item.blocks && item.blocks.length > 0); html += `
  • { addScript(iconURL, "iconScript"); } } - }) -} + }); +}; export const loadAssets = (data: IAppearance) => { const defaultStyleElement = document.getElementById("themeDefaultStyle");