blog/themes/hugo-theme-stack/layouts/partials/article/components/content.html

6 lines
297 B
HTML
Raw Normal View History

2024-11-03 20:08:36 +03:00
<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>" }}
{{ .Content | replaceRE "(<table>(?:.|\n)+?</table>)" $wrappedTable | safeHTML }}
</section>