diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go
index 084662b7a..df7b7103f 100644
--- a/hugolib/shortcode_test.go
+++ b/hugolib/shortcode_test.go
@@ -305,6 +305,12 @@ func TestFigureOnlySrc(t *testing.T) {
CheckShortCodeMatch(t, `{{< figure src="/found/here" >}}`, " Something bold italic Something bold italic \n
\n
{{ . }}
{{- end -}}
{{- if or (.Get "caption") (.Get "attr") -}}
- {{- .Get "caption" -}} + {{- .Get "caption" | markdownify -}} {{- with .Get "attrlink" -}} {{- end -}} - {{- .Get "attr" -}} + {{- .Get "attr" | markdownify -}} {{- if .Get "attrlink" }}{{ end }}
{{- end }} diff --git a/tpl/tplimpl/embedded/templates/shortcodes/figure.html b/tpl/tplimpl/embedded/templates/shortcodes/figure.html index 9fa847eaa..2da48ca8f 100644 --- a/tpl/tplimpl/embedded/templates/shortcodes/figure.html +++ b/tpl/tplimpl/embedded/templates/shortcodes/figure.html @@ -4,7 +4,7 @@ {{- end }}- {{- .Get "caption" -}} + {{- .Get "caption" | markdownify -}} {{- with .Get "attrlink" -}} {{- end -}} - {{- .Get "attr" -}} + {{- .Get "attr" | markdownify -}} {{- if .Get "attrlink" }}{{ end }}
{{- end }}