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 }} +