From ad375df7a86aa0733946d1bf35157e14e8d4301e Mon Sep 17 00:00:00 2001 From: tdro Date: Wed, 16 Nov 2022 11:14:07 -0500 Subject: themes/default/layouts/partials/function-content: Range over all blockquote footers --- .../default/layouts/partials/function-content.html | 24 ++++++++-------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/themes/default/layouts/partials/function-content.html b/themes/default/layouts/partials/function-content.html index bc90549..65ed4aa 100644 --- a/themes/default/layouts/partials/function-content.html +++ b/themes/default/layouts/partials/function-content.html @@ -10,24 +10,18 @@ replaceRE "

" "" | -}} -{{- $blockquoteFooterEnDash := delimit (findRE `\n

–.*

` .Content 1) "" -}} -{{- $blockquoteFooterEmDash := delimit (findRE `\n

—.*

` .Content 1) "" -}} +{{- $blockquoteFooters := findRE `\n

(–|—).*

` .Content -}} -{{- $blockquoteFooterFixedEnDash := $blockquoteFooterEnDash | - replaceRE "\n

" "

" | --}} +{{- range $blockquoteFooter := $blockquoteFooters -}} -{{- $blockquoteFooterFixedEmDash := $blockquoteFooterEmDash | - replaceRE "\n

" "

" | --}} + {{- $blockquoteFooterFixed := $blockquoteFooter | + replaceRE "\n

" "

" | + -}} -{{- - $content = $content | - replaceRE $blockquoteFooterEnDash $blockquoteFooterFixedEnDash | - replaceRE $blockquoteFooterEmDash $blockquoteFooterFixedEmDash | --}} + {{- $content = $content | replaceRE $blockquoteFooter $blockquoteFooterFixed -}} + +{{- end -}} {{- if $empty -}} {{- $content = "This message contains no content." -}} -- cgit v1.2.3