diff options
| author | XhmikosR <[email protected]> | 2019-10-24 16:47:38 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2019-11-04 15:32:29 +0200 |
| commit | 972369c997e4113607aaa002edd532e3d256f316 (patch) | |
| tree | bb07a702ae0d0786dbdea93353cbb92fb655f278 | |
| parent | e40b3355f09d444337eb0081877d02329fbf52c9 (diff) | |
| download | bootstrap-972369c997e4113607aaa002edd532e3d256f316.tar.xz bootstrap-972369c997e4113607aaa002edd532e3d256f316.zip | |
Tighten regex a bit.
If we need to make this more robust in the future, we can revert this as needed.
| -rw-r--r-- | site/layouts/shortcodes/example.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html index b1385653a..6701b1377 100644 --- a/site/layouts/shortcodes/example.html +++ b/site/layouts/shortcodes/example.html @@ -19,7 +19,7 @@ {{- end -}} {{- if eq $show_markup true -}} - {{- $content := replaceRE `<svg.*class=.bd\-placeholder\-img(?:\-lg)?(?:\s*?bd\-placeholder\-img\-lg)?\s?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}} - {{- $content = replaceRE `(class="\s*?")` "" $content -}} + {{- $content := replaceRE `<svg class="bd\-placeholder\-img(?:\-lg)?(?: *?bd\-placeholder\-img\-lg)? ?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}} + {{- $content = replaceRE `(class=" *?")` "" $content -}} {{- highlight (trim $content "\n") "html" "" -}} {{- end -}} |
