Use trim instead of replaceRE

This commit is contained in:
Will Faught
2024-07-08 12:18:15 -07:00
parent 4f9b9609dd
commit ee7b9f84e8
2 changed files with 2 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
{{ $content := .InnerDeindent | replaceRE "^\n" "" }} {{ $content := trim .InnerDeindent "\f\n\r\v" }}
{{ $lang := .Get 0 | default (.Get "lang") | default "plaintext" }} {{ $lang := .Get 0 | default (.Get "lang") | default "plaintext" }}
{{ $options := .Get "options" }} {{ $options := .Get "options" }}

View File

@@ -1,5 +1,5 @@
{{ $cite := .Get 0 | default (.Get "cite") }} {{ $cite := .Get 0 | default (.Get "cite") }}
{{ $content := .InnerDeindent | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }} {{ $content := trim .InnerDeindent "\f\n\r\v" | markdownify }}
{{ if not $content }} {{ if not $content }}
{{ errorf "layouts/shortcodes/paige/quote.html: no content" }} {{ errorf "layouts/shortcodes/paige/quote.html: no content" }}