From 28ff671095438a4f272f1a437f4482adc729d089 Mon Sep 17 00:00:00 2001 From: TinkMingKing <32903588+TinkMingKing@users.noreply.github.com> Date: Sun, 13 Aug 2023 17:06:18 +0800 Subject: [PATCH] Update mathRender.ts --- app/src/protyle/render/mathRender.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/protyle/render/mathRender.ts b/app/src/protyle/render/mathRender.ts index 8c4a4bcf928..74ee8680d96 100644 --- a/app/src/protyle/render/mathRender.ts +++ b/app/src/protyle/render/mathRender.ts @@ -10,6 +10,7 @@ declare const katex: { output: string; macros: IObject; trust: boolean; + strict: (errorCode:string) => 'ignore' | 'warn'; }): string; }; @@ -48,6 +49,7 @@ export const mathRender = (element: Element, cdn = Constants.PROTYLE_CDN, maxWid output: "html", macros, trust: true, // REF: https://katex.org/docs/supported#html + strict: (errorCode) => errorCode === 'unicodeTextInMathMode' ? 'ignore' : 'warn', }); renderElement.classList.remove("ft__error"); const blockElement = hasClosestBlock(mathElement);