aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2025-05-12 18:37:03 -0400
committerPaul Duncan <pabs@pablotron.org>2025-05-12 18:37:03 -0400
commitf5194f5c3bae49a43e4f808b49396a1dc11ba23a (patch)
tree4ca4651ce0c62b09b881089531c580dbe869b825
parent2a6a2d0fea0222ead7904afc02bccb9ec954efb2 (diff)
downloadpablotron.org-f5194f5c3bae49a43e4f808b49396a1dc11ba23a.tar.xz
pablotron.org-f5194f5c3bae49a43e4f808b49396a1dc11ba23a.zip
themes/hugo-pt2021/layouts/shortcodes/pe-picture.html: always generate alt attribute for img elements
-rw-r--r--themes/hugo-pt2021/layouts/shortcodes/pe-picture.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/themes/hugo-pt2021/layouts/shortcodes/pe-picture.html b/themes/hugo-pt2021/layouts/shortcodes/pe-picture.html
index 3135fcf..b7623ec 100644
--- a/themes/hugo-pt2021/layouts/shortcodes/pe-picture.html
+++ b/themes/hugo-pt2021/layouts/shortcodes/pe-picture.html
@@ -69,7 +69,7 @@ Features:
{{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 -}}
@@ -93,7 +93,7 @@ Features:
{{/* emit img */}}
<img
src='{{- $src -}}'
- {{if $pic.tip}} alt='{{- $pic.tip -}}'{{end}}
+ alt='{{if $pic.tip}}{{- $pic.tip -}}{{end}}'
/>
{{- end -}}
{{- end -}}