Explorar o código

:rotating_light:

Vanessa %!s(int64=3) %!d(string=hai) anos
pai
achega
88c666b723

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

@@ -63,14 +63,14 @@ export const genSBElement = (layout: string, id?: string, attrHTML?: string) =>
 export const jumpToParentNext = (protyle:IProtyle,nodeElement: Element) => {
     const topElement = getTopAloneElement(nodeElement);
     if (topElement) {
-        const topParentElement = hasClosestByClassName(topElement, "list") || hasClosestByClassName(topElement, "bq") || hasClosestByClassName(topElement, "sb") || topElement
-        const nextElement = getNextBlock(topParentElement)
+        const topParentElement = hasClosestByClassName(topElement, "list") || hasClosestByClassName(topElement, "bq") || hasClosestByClassName(topElement, "sb") || topElement;
+        const nextElement = getNextBlock(topParentElement);
         if (nextElement) {
-            focusBlock(nextElement)
+            focusBlock(nextElement);
             scrollCenter(protyle, nextElement);
         }
     }
-}
+};
 
 export const insertEmptyBlock = (protyle: IProtyle, position: InsertPosition, id?: string) => {
     const range = getEditorRange(protyle.wysiwyg.element);

+ 1 - 1
app/src/protyle/breadcrumb/action.ts

@@ -36,7 +36,7 @@ export const netImg2LocalAssets = (protyle: IProtyle) => {
         });
         /// #endif
     });
-}
+};
 
 export const fullscreen = (element: Element, btnElement?: Element) => {
     const isFullscreen = element.className.includes("fullscreen");

+ 1 - 1
app/src/protyle/breadcrumb/index.ts

@@ -219,7 +219,7 @@ export class Breadcrumb {
                 icon: "iconTransform",
                 accelerator: window.siyuan.config.keymap.editor.general.netImg2LocalAsset.custom,
                 click () {
-                    netImg2LocalAssets(protyle)
+                    netImg2LocalAssets(protyle);
                 }
             }).element);
             window.siyuan.menus.menu.append(new MenuItem({

+ 1 - 1
app/src/protyle/gutter/index.ts

@@ -1099,7 +1099,7 @@ export class Gutter {
                 accelerator: window.siyuan.config.keymap.editor.general.jumpToParentNext.custom,
                 click() {
                     nodeElement.classList.remove("protyle-wysiwyg--select");
-                    jumpToParentNext(protyle, nodeElement)
+                    jumpToParentNext(protyle, nodeElement);
                 }
             }).element);
             window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);

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

@@ -43,7 +43,7 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent) => {
         return true;
     }
     if (matchHotKey(window.siyuan.config.keymap.editor.general.netImg2LocalAsset.custom, event)) {
-        netImg2LocalAssets(protyle)
+        netImg2LocalAssets(protyle);
         event.preventDefault();
         event.stopPropagation();
         return;

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

@@ -226,7 +226,7 @@ export class WYSIWYG {
             } else {
                 const tempElement = document.createElement("div");
                 // https://github.com/siyuan-note/siyuan/issues/5540
-                const selectTypes = protyle.toolbar.getCurrentType(range)
+                const selectTypes = protyle.toolbar.getCurrentType(range);
                 if ((selectTypes.length === 1 || range.startContainer.parentElement.parentElement.getAttribute("data-type") === "NodeHeading") &&
                     (
                         (range.startContainer.nodeType === 3 && range.startContainer.parentElement.textContent === range.toString()) ||

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

@@ -1190,7 +1190,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
             return true;
         }
         if (matchHotKey(window.siyuan.config.keymap.editor.general.jumpToParentNext.custom, event)) {
-            jumpToParentNext(protyle, nodeElement)
+            jumpToParentNext(protyle, nodeElement);
             event.preventDefault();
             event.stopPropagation();
             return true;

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

@@ -381,7 +381,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b
         if (operation.previousID) {
             let beforeElement: Element;
             Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.previousID}"]`)).find(item => {
-                const embedElement = hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed")
+                const embedElement = hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed");
                 if (embedElement) {
                     // https://github.com/siyuan-note/siyuan/issues/5524
                     embedElement.removeAttribute("data-render");