From: XhmikosR Date: Fri, 13 Nov 2020 10:45:11 +0000 (+0200) Subject: example.html: remove extra whitespace (#32143) X-Git-Tag: v5.0.0-beta1~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5b405ea9adc753ec39bc7309d38bf76291a2cf0;p=thirdparty%2Fbootstrap.git example.html: remove extra whitespace (#32143) If we don't pass `class` to the `placeholder` shortcode, this resulted in two spaces before the `alt` attribute: ```html {{< example >}} {{< placeholder width="64" height="64" >}} {{< /example >}} ``` ```html ... ``` --- diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html index cebb06ad47..fd20839cbe 100644 --- a/site/layouts/shortcodes/example.html +++ b/site/layouts/shortcodes/example.html @@ -21,6 +21,6 @@ {{- if eq $show_markup true -}} {{- $content := replaceRE `\n` `...` $input -}} - {{- $content = replaceRE `(class=" *?")` "" $content -}} + {{- $content = replaceRE ` (class=" *?")` "" $content -}} {{- highlight (trim $content "\n") $lang "" -}} {{- end -}}