From afc0e83ecc00e748a617861be3318522069bd3eb Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 22 Oct 2020 09:32:46 +0300 Subject: [PATCH] Update bs-table shortcode (#31803) --- site/layouts/shortcodes/bs-table.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/site/layouts/shortcodes/bs-table.html b/site/layouts/shortcodes/bs-table.html index 6f972d6651..40b9b8ce56 100644 --- a/site/layouts/shortcodes/bs-table.html +++ b/site/layouts/shortcodes/bs-table.html @@ -1,11 +1,9 @@ {{- /* - Usage: `table "class"`, + Usage: `bs-table "class class-foo"`, where class can be anything */ -}} -{{ $htmlTable := .Inner | markdownify }} -{{ $css_class := .Get 0 | default "table" }} -{{ $old := "" }} -{{ $new := printf "
" $css_class }} -{{ $htmlTable := replace $htmlTable $old $new }} -{{ $htmlTable | safeHTML }} +{{- $css_class := .Get 0 | default "table" -}} +{{- $html_table := .Inner | markdownify -}} +{{- $html_table = replace $html_table "
" (printf `
` $css_class) -}} +{{- $html_table | safeHTML -}}