diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-04-20 20:22:53 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-04-20 20:22:53 +0200 |
commit | 8f7891e70c51163185fbbd878b4925d11b6a2a93 (patch) | |
tree | 09ff03c47855d3389462f8a76e8f344fdd330fba /docs/layouts | |
parent | d3a64708f49139552ca79a199a4cbf6544375443 (diff) | |
parent | 07b8d9466dfb59c429c1b470a0443337bc0aeefe (diff) |
Merge commit '07b8d9466dfb59c429c1b470a0443337bc0aeefe'
Diffstat (limited to 'docs/layouts')
-rw-r--r-- | docs/layouts/shortcodes/datatable-filtered.html | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/docs/layouts/shortcodes/datatable-filtered.html b/docs/layouts/shortcodes/datatable-filtered.html index 576ddab6f..ff3f299bd 100644 --- a/docs/layouts/shortcodes/datatable-filtered.html +++ b/docs/layouts/shortcodes/datatable-filtered.html @@ -20,8 +20,19 @@ {{ range $k, $v := . }} {{ $.Scratch.Set $k $v }} {{ end }} - {{ range $fields }} - <td>{{ $.Scratch.Get . }}</td> + {{ range $k, $v := $fields }} + <td> + {{ $tdContent := $.Scratch.Get . }} + {{ if eq $k 3 }} + {{ printf "%v" $tdContent | + strings.ReplaceRE `\[` "<ol><li>" | + strings.ReplaceRE `\s` "</li><li>" | + strings.ReplaceRE `\]` "</li></ol>" | + safeHTML }} + {{ else }} + {{ $tdContent }} + {{ end}} + </td> {{ end }} </tr> {{ end }} |