diff options
author | Paul Duncan <pabs@pablotron.org> | 2025-05-12 18:35:57 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2025-05-12 18:35:57 -0400 |
commit | 2a6a2d0fea0222ead7904afc02bccb9ec954efb2 (patch) | |
tree | 20da73d41a7739bc33cabaf45ccd442e3bead7f8 | |
parent | 9124d3d214e45ddad007e99c28f38872b8cefc5a (diff) | |
download | pablotron.org-2a6a2d0fea0222ead7904afc02bccb9ec954efb2.tar.xz pablotron.org-2a6a2d0fea0222ead7904afc02bccb9ec954efb2.zip |
themes/hugo-pt2021/layouts/shortcodes/pe-figure.html: always generate alt attribute for img elements
-rw-r--r-- | themes/hugo-pt2021/layouts/shortcodes/pe-figure.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/hugo-pt2021/layouts/shortcodes/pe-figure.html b/themes/hugo-pt2021/layouts/shortcodes/pe-figure.html index 324d11f..b90a260 100644 --- a/themes/hugo-pt2021/layouts/shortcodes/pe-figure.html +++ b/themes/hugo-pt2021/layouts/shortcodes/pe-figure.html @@ -66,7 +66,7 @@ enhancement. {{if $src.width}} width='{{- $src.width -}}'{{- end}} {{if $src.height}} height='{{- $src.height -}}'{{- end}} - {{if (or $pic.tip $src.tip)}} alt='{{- default $pic.tip $src.tip -}}'{{- end}} + alt='{{if (or $pic.tip $src.tip)}}{{- default $pic.tip $src.tip -}}{{- end}}' /> {{- end -}} {{- else -}} @@ -90,7 +90,7 @@ enhancement. {{/* emit img */}} <img src='{{- $src -}}' - {{if $pic.tip}} alt='{{- $pic.tip -}}'{{end}} + alt='{{if $pic.tip}}{{- $pic.tip -}}{{end}}' /> {{- end -}} {{- end -}} |