Merge pull request #3721 from hhunter-ms/add-table-html

Add html for rendering markdown tables
This commit is contained in:
Hannah Hunter 2023-09-12 14:16:00 -04:00 committed by GitHub
commit b11004c82c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,6 @@
{{ $htmlTable := .Inner | markdownify }}
{{ $class := .Get 0 | default "" }}
{{ $old := "<table>" }}
{{ $new := printf "<table class=\"%s\">" $class }}
{{ $htmlTable := replace $htmlTable $old $new }}
{{ $htmlTable | safeHTML }}