mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
fix: markdown and katex rendering problem
This commit is contained in:
parent
00357fcd51
commit
ec960de5ec
@ -1,5 +1,8 @@
|
||||
<section class="article-content">
|
||||
<!-- Refer to https://discourse.gohugo.io/t/responsive-tables-in-markdown/10639/5 -->
|
||||
{{ $wrappedTable := printf "<div class=\"table-wrapper\">${1}</div>" }}
|
||||
{{ if or .Params.math .Site.Params.article.math }}
|
||||
{{ partial "article/components/mdtexbug" . }}
|
||||
{{ end }}
|
||||
{{ .Content | replaceRE "(<table>(?:.|\n)+?</table>)" $wrappedTable | safeHTML }}
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user