From ee7b9f84e8c06285904335a797da87fcb63637ea Mon Sep 17 00:00:00 2001 From: Will Faught Date: Mon, 8 Jul 2024 12:18:15 -0700 Subject: [PATCH] Use trim instead of replaceRE --- layouts/shortcodes/paige/code.html | 2 +- layouts/shortcodes/paige/quote.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/paige/code.html b/layouts/shortcodes/paige/code.html index f9533826..d85acb3f 100644 --- a/layouts/shortcodes/paige/code.html +++ b/layouts/shortcodes/paige/code.html @@ -1,4 +1,4 @@ -{{ $content := .InnerDeindent | replaceRE "^\n" "" }} +{{ $content := trim .InnerDeindent "\f\n\r\v" }} {{ $lang := .Get 0 | default (.Get "lang") | default "plaintext" }} {{ $options := .Get "options" }} diff --git a/layouts/shortcodes/paige/quote.html b/layouts/shortcodes/paige/quote.html index 83f1d4a1..eafa5a78 100644 --- a/layouts/shortcodes/paige/quote.html +++ b/layouts/shortcodes/paige/quote.html @@ -1,5 +1,5 @@ {{ $cite := .Get 0 | default (.Get "cite") }} -{{ $content := .InnerDeindent | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }} +{{ $content := trim .InnerDeindent "\f\n\r\v" | markdownify }} {{ if not $content }} {{ errorf "layouts/shortcodes/paige/quote.html: no content" }}