2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

docs: add a StackBlitz "Try It" button in code examples (#35644)

Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
Puru Vijay
2022-03-09 21:02:58 +05:30
committed by GitHub
parent 7e5a8016ba
commit 645f955845
4 changed files with 73 additions and 11 deletions
+3
View File
@@ -22,6 +22,9 @@
{{- end -}}
{{- if eq $show_markup true -}}
<div class="bd-edit">
<button type="button" class="btn-edit text-nowrap" title="Try it on StackBlitz">Try it</button>
</div>
{{- $content := replaceRE `<svg class="bd-placeholder-img(?:-lg)?(?: *?bd-placeholder-img-lg)? ?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}}
{{- $content = replaceRE ` (class=" *?")` "" $content -}}
{{- highlight (trim $content "\n") $lang "" -}}