diff --git a/layouts/partials/shortcodes/link.html b/layouts/partials/shortcodes/link.html
index 73cb7c2506..9e0817a144 100644
--- a/layouts/partials/shortcodes/link.html
+++ b/layouts/partials/shortcodes/link.html
@@ -47,5 +47,5 @@
{{- warnf "%q: no page was found for link '%s'" $page.File.Filename $url.Path }}
{{- end }}
{{- end }}
-{{- end }}
+{{- end -}}
{{ $content | safeHTML }}
\ No newline at end of file