Unverified Commit afc0e83e authored by XhmikosR's avatar XhmikosR Committed by GitHub
Browse files

Update bs-table shortcode (#31803)

parent 341bd5aa
Showing with 5 additions and 7 deletions
+5 -7
{{- /*
Usage: `table "class"`,
Usage: `bs-table "class class-foo"`,
where class can be anything
*/ -}}
{{ $htmlTable := .Inner | markdownify }}
{{ $css_class := .Get 0 | default "table" }}
{{ $old := "<table>" }}
{{ $new := printf "<table class=\"%s\">" $css_class }}
{{ $htmlTable := replace $htmlTable $old $new }}
{{ $htmlTable | safeHTML }}
{{- $css_class := .Get 0 | default "table" -}}
{{- $html_table := .Inner | markdownify -}}
{{- $html_table = replace $html_table "<table>" (printf `<table class="%s">` $css_class) -}}
{{- $html_table | safeHTML -}}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment