diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html index a13cccca4c..22b3906ee2 100644 --- a/site/layouts/shortcodes/example.html +++ b/site/layouts/shortcodes/example.html @@ -19,36 +19,7 @@ {{- end -}} {{- if eq $show_markup true -}} - {{- $.Scratch.Set "highlight_content" $input -}} - - {{- if (strings.Contains $input `\n" "✂️" -}} - {{- $modified_content = split $modified_content "✂️" -}} - - {{- range $content_chunk := $modified_content -}} - {{- $image_class := "" -}} - - {{- if (strings.Contains $content_chunk `` $image_class) -}} - {{- else -}} - {{- $.Scratch.Add "highlight_content" `...` -}} - {{- end -}} - {{- else -}} - {{- $.Scratch.Add "highlight_content" $content_chunk -}} - {{- end -}} - {{- end -}} - {{- end -}} - - {{- highlight (trim ($.Scratch.Get "highlight_content") "\n") "html" "" -}} + {{- $content := replaceRE `\n` `...` $input -}} + {{- $content = replaceRE `(class="\s*?")` `` $content -}} + {{- highlight (trim $content `\n`) `html` `` -}} {{- end -}}