mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-02-06 11:53:31 +08:00
fix: resolve inline code block rendering issue on Microsoft Edge translation
This commit is contained in:
parent
839fbd0ecb
commit
392b2844a0
@ -1,5 +1,6 @@
|
|||||||
<section class="article-content">
|
<section class="article-content">
|
||||||
<!-- Refer to https://discourse.gohugo.io/t/responsive-tables-in-markdown/10639/5 -->
|
<!-- Refer to https://discourse.gohugo.io/t/responsive-tables-in-markdown/10639/5 -->
|
||||||
{{ $wrappedTable := printf "<div class=\"table-wrapper\">${1}</div>" }}
|
{{ $wrappedTable := printf "<div class=\"table-wrapper\">${1}</div>" }}
|
||||||
{{ .Content | replaceRE "(<table>(?:.|\n)+?</table>)" $wrappedTable | safeHTML }}
|
{{ $wrappedInlineCodeBlock := printf "<span>${1}</span>" }}
|
||||||
|
{{ .Content | replaceRE "(<table>(?:.|\n)+?</table>)" $wrappedTable | replaceRE "(<code>.*?</code>)" $wrappedInlineCodeBlock | safeHTML }}
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
Reference in New Issue
Block a user