{{ $caption := .Get "caption" }} {{ $useHeaderRow := .Get "header" }} {{ $rows := .Inner | transform.Unmarshal }} <div class="custom-table-horizontal-scroll" > <table class="sortable"> {{ with $caption }}<caption>{{ . }}</caption>{{ end }} {{ if $useHeaderRow }} {{ $headerRow := index $rows 0 }} {{ $rows = after 1 $rows }} <thead><tr> {{ range $headerRow }} <th>{{ . }}</th> {{ end }} </tr></thead> {{ end }} {{ range $rows }} <tr> {{ range . }} {{ if (findRE "^\\d+$" .) }} <td class="numeric">{{ . }}</td> {{ else }} <td>{{ . }}</td> {{ end }} {{ end }} </tr> {{ end }} </table> </div>