From 00357fcd51e53d5012780b2a25c2d3a3b400e549 Mon Sep 17 00:00:00 2001 From: zayn7lie Date: Tue, 9 Apr 2024 22:31:00 -0400 Subject: [PATCH] fix: markdown and katex rendering problem --- layouts/partials/article/components/mdtexbug.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 layouts/partials/article/components/mdtexbug.html diff --git a/layouts/partials/article/components/mdtexbug.html b/layouts/partials/article/components/mdtexbug.html new file mode 100644 index 0000000..4dcb7fc --- /dev/null +++ b/layouts/partials/article/components/mdtexbug.html @@ -0,0 +1,12 @@ + +{{ $content := .RawContent }} + +{{ $content = $content | replaceRE "\\\\\\\\" "\\\\\\\\" }} + +{{ $content = $content | replaceRE "\\\\{" "\\\\{" }} +{{ $content = $content | replaceRE "\\\\}" "\\\\}" }} + +{{ $content = $content | replaceRE "\\_\\{" "\\_{" }} +{{ $content = $content | replaceRE "\\_\\\\" "\\_\\" }} + +{{ $content | .Page.RenderString | safeHTML }}