Use trim instead of replaceRE

master
Will Faught 1 year ago
parent 4f9b9609dd
commit ee7b9f84e8

@ -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" }}

@ -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" }}

Loading…
Cancel
Save