chore(deps): update pangu.js references and configuration

This commit is contained in:
Cell
2026-05-17 14:27:17 +08:00
parent ed8ec5c2c8
commit ebcf22d2bc
7 changed files with 7 additions and 23 deletions
-1
View File
@@ -14,7 +14,6 @@ link_guard:
- demo.fixit.lruihao.cn
---
This post validates link rendering paths in FixIt, including Markdown render hook and link shortcode modes.
<!--more-->
+1 -1
View File
@@ -61,7 +61,7 @@ libFiles:
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
# pace-js@1.2.4 https://github.com/CodeByZach/pace
paceJS: pace-js@1.2.4
# pangu.js@4.0.7 https://github.com/vinta/pangu.js
# pangu@7.2.1 https://github.com/vinta/pangu.js
panguJS: pangu@7.2.1/dist/browser/pangu.min.js
# @panzoom/panzoom@4.6.2 https://github.com/timmywil/panzoom
panzoomJS: '@panzoom/panzoom@4.6.2/dist/panzoom.min.js'
+1 -1
View File
@@ -61,7 +61,7 @@ libFiles:
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
# pace-js@1.2.4 https://github.com/CodeByZach/pace
paceJS: pace-js@1.2.4
# pangu.js@4.0.7 https://github.com/vinta/pangu.js
# pangu@7.2.1 https://github.com/vinta/pangu.js
panguJS: pangu@7.2.1/dist/browser/pangu.min.js
# @panzoom/panzoom@4.6.2 https://github.com/timmywil/panzoom
panzoomJS: '@panzoom/panzoom@4.6.2/dist/panzoom.min.js'
+3 -9
View File
@@ -1554,17 +1554,11 @@ class FixIt {
initPangu() {
if (!this.config.pangu?.enable) return;
// to avoid extra spaces for extended Markdown syntax fraction in Chinese
pangu.ignoredTags = /^(script|code|pre|textarea|sup|sub)$/i;
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('.')) {
pangu.spacingElementByClassName(selector.slice(1));
} else {
pangu.spacingElementByTagName(selector)
}
document.querySelectorAll(selector).forEach((el) => pangu.spacingNode(el));
return;
}
pangu.autoSpacingPage();
-9
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,4 +1,4 @@
{{- hugo.Store.Set "version" "v0.4.6-20260512073637-464c4659" -}}
{{- hugo.Store.Set "version" "v0.4.6-20260517062719-ed8ec5c2" -}}
{{- .Store.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
+1 -1
View File
@@ -209,7 +209,7 @@ FixIt theme assets partial
{{- /* PanguJS */ -}}
{{- if eq .Site.Params.pangu.enable true -}}
{{- $source := $cdn.panguJS | default "lib/pangu/pangu.min.js" -}}
{{- $source := $cdn.panguJS | default "lib/pangu/pangu.umd.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}}
{{- $config = dict "pangu" .Site.Params.pangu | merge $config -}}
{{- end -}}