1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-18 19:31:35 +02:00

Rewrite docs tables in Markdown with table shortcode (#31337)

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: GeoSot <geo.sotis@gmail.com>
This commit is contained in:
Mark Otto
2022-03-14 00:38:04 -07:00
committed by GitHub
parent 8fe82c7176
commit a9a89debc7
22 changed files with 468 additions and 1956 deletions

View File

@@ -4,5 +4,6 @@
{{- $css_class := .Get 0 | default "table" -}}
{{- $html_table := .Inner | markdownify -}}
{{- $html_table = replace $html_table "<table>" (printf `<table class="%s">` $css_class) -}}
{{- $html_table = replace $html_table "<table>" (printf `<div class="table-responsive"><table class="%s">` $css_class) -}}
{{- $html_table = replace $html_table "</table>" "</table></div>" -}}
{{- $html_table | safeHTML -}}