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
This commit is contained in:
zhixuan
2022-01-20 12:09:25 +01:00
committed by GitHub
parent 3b98d3ba05
commit 0af9d23e49
5 changed files with 18 additions and 17 deletions
@@ -1,3 +1,5 @@
<section class="article-content">
{{ .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>