{{ $htmlTable := .Inner | markdownify }} {{ $table_class := default "table table-striped table-bordered" (.Get "table_class") }} {{ $thead_class := default "table-dark" (.Get "thead_class") }} {{ if .Get "caption" }} {{ $caption := .Get "caption" }} {{ $old_cap := "" }} {{ $new_cap := printf "
\n" $caption }} {{ $htmlTable = replace $htmlTable $old_cap $new_cap }} {{ end }} {{ $old_class := "
%s
" }} {{ $new_class := printf "
" $table_class }} {{ $htmlTable = replace $htmlTable $old_class $new_class }} {{ $old_thead := "" }} {{ $new_thead := printf "" $thead_class }} {{ $htmlTable = replace $htmlTable $old_thead $new_thead }}
{{ $htmlTable | safeHTML }}