diff options
| -rw-r--r-- | site/layouts/shortcodes/example.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html index 6701b1377..cebb06ad4 100644 --- a/site/layouts/shortcodes/example.html +++ b/site/layouts/shortcodes/example.html @@ -8,6 +8,7 @@ show_markup: if the markup should be output in the HTML - default: `true` */ -}} +{{- $lang := .Get "lang" | default "html" -}} {{- $show_preview := .Get "show_preview" | default true -}} {{- $show_markup := .Get "show_markup" | default true -}} {{- $input := .Inner -}} @@ -21,5 +22,5 @@ {{- if eq $show_markup true -}} {{- $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") "html" "" -}} + {{- highlight (trim $content "\n") $lang "" -}} {{- end -}} |
