Przeglądaj źródła

:rotating_light:

Vanessa 1 rok temu
rodzic
commit
17a619a55b

+ 1 - 1
app/src/block/util.ts

@@ -86,7 +86,7 @@ export const jumpToParent = (protyle: IProtyle, nodeElement: Element, type: "par
             app: protyle.app,
             id: targetId,
             action: [Constants.CB_GET_FOCUS, targetId !== protyle.block.rootID && protyle.block.showAll ? Constants.CB_GET_ALL : ""]
-        })
+        });
         /// #else
         openMobileFileById(protyle.app, targetId, [Constants.CB_GET_FOCUS, targetId !== protyle.block.rootID && protyle.block.showAll ? Constants.CB_GET_ALL : ""]);
         /// #endif

+ 1 - 1
app/src/boot/globalEvent/commandPanel.ts

@@ -37,7 +37,7 @@ export const commandPanel = (app: App) => {
     dialog.element.setAttribute("data-key", Constants.DIALOG_COMMANDPANEL);
     const listElement = dialog.element.querySelector("#commands");
     /// #if !MOBILE
-    let html = ""
+    let html = "";
     Object.keys(window.siyuan.config.keymap.general).forEach((key) => {
         if (["addToDatabase"].includes(key)) {
             html += `<li class="b3-list-item" data-command="${key}">

+ 2 - 2
app/src/menus/util.ts

@@ -57,7 +57,7 @@ export const openEditorTab = (app: App, ids: string[], notebookId?: string, path
                             zoomIn
                         });
                     });
-                })
+                });
             }
         }
     }, {
@@ -83,7 +83,7 @@ export const openEditorTab = (app: App, ids: string[], notebookId?: string, path
                             zoomIn
                         });
                     });
-                })
+                });
             }
         }
     }];

+ 2 - 2
app/src/protyle/render/av/addToDatabase.ts

@@ -31,7 +31,7 @@ export const addFilesToDatabase = (fileLiElements: Element[]) => {
             }]);
         });
     }
-}
+};
 
 export const addEditorToDatabase = (protyle: IProtyle, range: Range, type?: string) => {
     if (protyle.title?.editElement.contains(range.startContainer) || type === "title") {
@@ -100,4 +100,4 @@ export const addEditorToDatabase = (protyle: IProtyle, range: Range, type?: stri
             focusByRange(range);
         });
     }
-}
+};

+ 0 - 1
app/src/protyle/render/highlightRender.ts

@@ -2,7 +2,6 @@ import {addScript} from "../util/addScript";
 import {Constants} from "../../constants";
 import {focusByOffset} from "../util/selection";
 import {setCodeTheme} from "../../util/assets";
-import {hasClosestByClassName} from "../util/hasClosest";
 
 export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) => {
     let codeElements: NodeListOf<Element>;

+ 1 - 1
app/src/protyle/wysiwyg/remove.ts

@@ -171,7 +171,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran
         hideElements(["util"], protyle);
         return;
     }
-    const blockType = blockElement.getAttribute("data-type")
+    const blockType = blockElement.getAttribute("data-type");
     // 空代码块直接删除
     if (blockType === "NodeCodeBlock" && getContenteditableElement(blockElement).textContent.trim() === "") {
         blockElement.classList.add("protyle-wysiwyg--select");