From 9c98f2142f2e32509d1c5c66a5fc159c19810900 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Mon, 24 Nov 2025 15:14:14 +0800 Subject: [PATCH] fix(MathJax): parsing error after decrypting encrypted articles --- assets/js/theme.js | 6 +++++- layouts/_partials/init/index.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index 12f49d2d..55f334bf 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -1158,7 +1158,11 @@ class FixIt { } initMathJax() { - window.MathJax?.typeset && window.MathJax.typeset(); + if (window.MathJax?.typesetPromise) { + window.MathJax.typesetPromise().then(() => { + // Do something else after typesetting is complete + }).catch((err) => console.log(err.message)); + } } initJsonViewer() { diff --git a/layouts/_partials/init/index.html b/layouts/_partials/init/index.html index ddf330b2..9e62843e 100644 --- a/layouts/_partials/init/index.html +++ b/layouts/_partials/init/index.html @@ -1,4 +1,4 @@ -{{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251124063901-7d530c9f" -}} +{{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251124071416-efeb70e1" -}} {{- .Store.Set "this" dict -}} {{- partial "init/detection-env.html" . -}}