From 61d69cc213fc42650915f3ac6fa5e35d298401c8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 4 Dec 2024 19:46:49 +0800 Subject: [PATCH] :mute: https://github.com/siyuan-note/siyuan/issues/13346 --- app/src/protyle/util/Options.ts | 1 - app/src/protyle/util/log.ts | 6 ------ app/src/protyle/wysiwyg/input.ts | 3 --- app/src/types/protyle.d.ts | 2 -- 4 files changed, 12 deletions(-) delete mode 100644 app/src/protyle/util/log.ts diff --git a/app/src/protyle/util/Options.ts b/app/src/protyle/util/Options.ts index 096d59e5b21..c83b175d117 100644 --- a/app/src/protyle/util/Options.ts +++ b/app/src/protyle/util/Options.ts @@ -21,7 +21,6 @@ export class Options { classes: { preview: "", }, - debugger: Constants.NODE_ENV === "development", hint: { delay: 200, emoji: { diff --git a/app/src/protyle/util/log.ts b/app/src/protyle/util/log.ts deleted file mode 100644 index 566102b5fc2..00000000000 --- a/app/src/protyle/util/log.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const log = (method: string, content: string, type: string, print: boolean) => { - if (print) { - // @ts-ignore - console.log(`${method} - ${type}: ${content}`); - } -}; diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index 5d963618403..f39658ab40d 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -1,4 +1,3 @@ -import {log} from "../util/log"; import {focusBlock, focusByWbr} from "../util/selection"; import {Constants} from "../../constants"; import * as dayjs from "dayjs"; @@ -174,8 +173,6 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: ) && !(tempElement.content.childElementCount === 1 && tempElement.content.firstElementChild.classList.contains("code-block") && type === "NodeCodeBlock") ) { - log("SpinBlockDOM", blockElement.outerHTML, "argument", protyle.options.debugger); - log("SpinBlockDOM", html, "result", protyle.options.debugger); if (blockElement.getAttribute("data-type") === "NodeHeading" && blockElement.getAttribute("fold") === "1" && tempElement.content.firstElementChild.getAttribute("data-subtype") !== blockElement.dataset.subtype) { setFold(protyle, blockElement, undefined, undefined, false); diff --git a/app/src/types/protyle.d.ts b/app/src/types/protyle.d.ts index 256b9e774ac..c5ab37188f0 100644 --- a/app/src/types/protyle.d.ts +++ b/app/src/types/protyle.d.ts @@ -458,8 +458,6 @@ interface IProtyleOptions { } /** 内部调试时使用 */ _lutePath?: string; - /** 是否显示日志。默认值: false */ - debugger?: boolean; /** 是否启用打字机模式。默认值: false */ typewriterMode?: boolean; /** 多语言。默认值: 'zh_CN' */