Hugo-theme-stack/layouts/partials/article/components/content.html
zhixuan 0af9d23e49
feat(article): add scroll for table (#428)
* feat: table can't scroll & delete scrollbar style for Chromium

* Undo some line breaks

* Add a table with overflow to exampleSite
2022-01-20 12:09:25 +01:00

6 lines
297 B
HTML

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