From 41014f7f5bf1dbf772777798d49305b4651cb8f6 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Sun, 3 Nov 2024 00:28:29 +0800 Subject: [PATCH] :bug: Fix: pangu adds extra spaces for extended Markdown syntax fraction in Chinese --- assets/js/theme.js | 2 ++ layouts/partials/init/index.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index bb2965bf4..fecdb263a 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -999,6 +999,8 @@ class FixIt { } const selector = this.config.pangu.selector; if (selector) { + // to avoid extra spaces for extended Markdown syntax fraction in Chinese + pangu.ignoredTags = /^(script|code|pre|textarea|sup|sub)$/i; if (selector.startsWith('#')) { pangu.spacingElementById(selector.slice(1)); } else if (selector.startsWith('.')) { diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index e4ef16ae5..5cedf56d6 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.14-894c512b" -}} +{{- .Scratch.Set "version" "v0.3.14-85d91b85" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}}