diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-11-13 13:45:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-13 13:45:11 +0300 |
commit | d5b405ea9adc753ec39bc7309d38bf76291a2cf0 (patch) | |
tree | 2d0494ff2a610195a1b3c176d59ff08b6ed3b115 /site/layouts | |
parent | 8a54cf598aba57b6bf48eb193547caa838a26843 (diff) |
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
<img src="..." alt="...">
```
Diffstat (limited to 'site/layouts')
-rw-r--r-- | site/layouts/shortcodes/example.html | 2 |
1 files changed, 1 insertions, 1 deletions
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 `<svg class="bd\-placeholder\-img(?:\-lg)?(?: *?bd\-placeholder\-img\-lg)? ?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}} - {{- $content = replaceRE `(class=" *?")` "" $content -}} + {{- $content = replaceRE ` (class=" *?")` "" $content -}} {{- highlight (trim $content "\n") $lang "" -}} {{- end -}} |