0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

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="...">
```
This commit is contained in:
XhmikosR 2020-11-13 12:45:11 +02:00 committed by GitHub
parent 8a54cf598a
commit d5b405ea9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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 -}}