]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
example.html: remove extra whitespace (#32143)
authorXhmikosR <xhmikosr@gmail.com>
Fri, 13 Nov 2020 10:45:11 +0000 (12:45 +0200)
committerGitHub <noreply@github.com>
Fri, 13 Nov 2020 10:45:11 +0000 (12:45 +0200)
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="...">
```

site/layouts/shortcodes/example.html

index cebb06ad47ae21334af86f4084d8bc34582c1d74..fd20839cbea7cfb50fdc40edaea6809fb2e21478 100644 (file)
@@ -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 -}}