diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html
index efcac00..32e3648 100644
--- a/layouts/shortcodes/figure.html
+++ b/layouts/shortcodes/figure.html
@@ -95,7 +95,7 @@
{{ with $link }}{{ end -}}
-
+
{{- if $link }}{{ end }}
{{ if or $title $caption $attr -}}
diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html
index 64eb94e..dde693f 100644
--- a/layouts/shortcodes/img.html
+++ b/layouts/shortcodes/img.html
@@ -90,5 +90,5 @@
{{ end -}}
{{ with $link }}{{ end -}}
-
+
{{- if $link }}{{ end }}
diff --git a/layouts/shortcodes/svg.html b/layouts/shortcodes/svg.html
index 1b06cb3..c7bb54f 100644
--- a/layouts/shortcodes/svg.html
+++ b/layouts/shortcodes/svg.html
@@ -54,7 +54,7 @@
{{ if $inline -}}
{{ $src | safeHTML }}
{{ else -}}
-
+
{{ end -}}
{{- if $link }}{{ end }}
{{ if $caption -}}