From 7dd22aa72fe4d4bceb96d2685861807613d233f5 Mon Sep 17 00:00:00 2001 From: zayn7lie Date: Mon, 15 Apr 2024 11:08:31 -0400 Subject: [PATCH] Update content.html --- .../partials/article/components/content.html | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/layouts/partials/article/components/content.html b/layouts/partials/article/components/content.html index b4ba5d1..2919dd7 100644 --- a/layouts/partials/article/components/content.html +++ b/layouts/partials/article/components/content.html @@ -1,8 +1,27 @@
+ + {{ $content := .RawContent }} + + + {{ if or .Params.math .Site.Params.article.math }} + + {{ $content = $content | replaceRE "\\\\\\\\" "\\\\\\\\" }} + + {{ $content = $content | replaceRE "\\\\{" "\\\\{" }} + {{ $content = $content | replaceRE "\\\\}" "\\\\}" }} + + {{ $content = $content | replaceRE "\\_\\{" "\\_{" }} + {{ $content = $content | replaceRE "\\_\\}" "\\_}" }} + {{ $content = $content | replaceRE "\\_\\\\" "\\_\\" }} + + {{ $content = $content | replaceRE "\\\\," "\\\\,"}} + {{ end }} + + + {{ $content = $content | .Page.RenderString | safeHTML }} + {{ $wrappedTable := printf "
${1}
" }} - {{ if or .Params.math .Site.Params.article.math }} - {{ partial "article/components/mdtexbug" . }} - {{ end }} - {{ .Content | replaceRE "((?:.|\n)+?
)" $wrappedTable | safeHTML }} + {{ $content | replaceRE "((?:.|\n)+?
)" $wrappedTable | safeHTML }} +