Merge pull request #2591 from pwhittlesea/support-markdown-attributes-on-images

 Support Hugo Markdown Attributes for Inline Images
This commit is contained in:
Nuno C.
2025-11-03 22:19:57 +00:00
committed by GitHub
7 changed files with 111 additions and 4 deletions

View File

@@ -82,7 +82,12 @@
{{- end -}}
<figure>
<figure
{{- range $k, $v := .Attributes -}}
{{- if $v -}}
{{- printf " %s=%q" $k ($v | transform.HTMLEscape) | safeHTMLAttr -}}
{{- end -}}
{{- end -}}>
{{- if $isRemote -}}
{{- template "RenderImageSimple" (dict "imgObj" "" "src" $urlStr "alt" $altText) -}}
{{- else if $resource -}}