Fix the problem that comment data couldn't be pulled successfully and raise Error "Cannot read property ‘insertBefore’ of null""

This commit is contained in:
fsj2009yx 2024-12-12 16:58:23 +08:00 committed by GitHub
parent 61ea9bec99
commit 22e4b6779d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,13 +1,14 @@
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}} {{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
<script> <script>
window.addEventListener("DOMContentLoaded", () => { window.addEventListener("DOMContentLoaded", () => {
renderMathInElement(document.body, { const mainArticleElement = document.querySelector(".main-article");
renderMathInElement(mainArticleElement, {
delimiters: [ delimiters: [
{ left: "$$", right: "$$", display: true }, { left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false }, { left: "$", right: "$", display: false },
{ left: "\\(", right: "\\)", display: false }, { left: "\\(", right: "\\)", display: false },
{ left: "\\[", right: "\\]", display: true } { left: "\\[", right: "\\]", display: true }
], ],
ignoredClasses: ["gist","waline-container"] ignoredClasses: ["gist"]
});}) });})
</script> </script>