{{- $htmlTable := .Inner | markdownify -}} {{- $table_class := .Get "class" -}} {{- $table_head := .Get "head" -}} {{- 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 "" $table_head -}} {{- $htmlTable = replace $htmlTable $old_thead $new_thead -}}
{{ $htmlTable | safeHTML }}