From 581aba335914034a137892257ba9bbf798d700b1 Mon Sep 17 00:00:00 2001 From: wermos <63574588+wermos@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:45:22 +0530 Subject: [PATCH] Be less aggressive in removing newlines. --- layouts/_default/_markup/render-link.html | 2 +- layouts/shortcodes/figure.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 @@ {{ $altText }} {{- end }} {{- end }} - {{- with $caption }}
{{ . | markdownify }}
{{ end }} - {{- if $href }}{{ end }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }} + {{ if $href }}{{ end }} {{- end -}}