diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index c5e9304a..b6028bf5 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -2,6 +2,6 @@
{{- with .Title -}}
title="{{ . }}"
{{- end }}
- {{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end -}}>
+ {{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
{{- .Text | safeHTML -}}
\ No newline at end of file
diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html
index 2d951d63..fb7293c8 100644
--- a/layouts/shortcodes/figure.html
+++ b/layouts/shortcodes/figure.html
@@ -44,7 +44,7 @@
{{- end }}
{{- end }}
- {{- with $caption }}{{ . | markdownify }}{{ end }}
- {{- if $href }}{{ end }}
+ {{ with $caption }}{{ . | markdownify }}{{ end }}
+ {{ if $href }}{{ end }}
{{- end -}}