From 77bbdceb03e7bf05b81673c0d9eef8d15cca2c83 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 30 Nov 2022 22:22:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B2=E6=9F=93=E9=A5=BC=E5=9B=BE=E3=80=81?= =?UTF-8?q?=E6=80=9D=E7=BB=B4=E5=AF=BC=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/PrismMac.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/components/PrismMac.js b/components/PrismMac.js index 2a80f116..2ec44618 100644 --- a/components/PrismMac.js +++ b/components/PrismMac.js @@ -70,14 +70,6 @@ function renderPrismMac() { } }, 10) - // 重新渲染之前检查所有的多余text - - try { - Prism.highlightAll() - } catch (err) { - console.log('代码渲染', err) - } - // 支持 Mermaid const mermaids = document.querySelectorAll('.notion-code .language-mermaid') if (mermaids) { @@ -102,6 +94,14 @@ function renderPrismMac() { } } } + + // 重新渲染之前检查所有的多余text + + try { + Prism.highlightAll() + } catch (err) { + console.log('代码渲染', err) + } } export default PrismMac