From 0bcdfc179e8df8893448406fedbbac78ecea7c3d Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Sat, 15 Jan 2022 06:08:01 -0500 Subject: [PATCH] Fix trailing whitespace when no content Signed-off-by: Daniel F. Dickinson --- layouts/partials/helpers/basic-content.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/helpers/basic-content.html b/layouts/partials/helpers/basic-content.html index 8e63786..bae02e0 100644 --- a/layouts/partials/helpers/basic-content.html +++ b/layouts/partials/helpers/basic-content.html @@ -1,8 +1,8 @@ {{- /* If there is are H1 elements in content rendered from content file, replace H1 with H2 */ -}} {{- if . -}} - {{- if gt (len (findRE "(.|\n)*?" .)) 0 }} - {{ replaceRE "((.*|\n)*?)" "

$5

" . | safeHTML -}} - {{- else }} - {{ . | safeHTML -}} + {{- if gt (len (findRE "(.|\n)*?" .)) 0 -}} + {{- replaceRE "((.*|\n)*?)" "

$5

" . | safeHTML -}} + {{- else -}} + {{- . | safeHTML -}} {{- end -}} {{- end -}} \ No newline at end of file