From bbb65a782f4db17efa0579168d597e651cd45dbe Mon Sep 17 00:00:00 2001 From: tdro Date: Wed, 16 Nov 2022 11:57:23 -0500 Subject: themes/default/layouts/partials/function-content: Blockquotes search multi line before single line Should cover majority of cases for now --- themes/default/layouts/partials/function-content.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/themes/default/layouts/partials/function-content.html b/themes/default/layouts/partials/function-content.html index 256d7e0..239badc 100644 --- a/themes/default/layouts/partials/function-content.html +++ b/themes/default/layouts/partials/function-content.html @@ -10,17 +10,22 @@ replaceRE "

" "" | -}} -{{- $blockquoteFooters := findRE `(?s)\n

(–|—).*

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

(–|—).*

` .Content -}} {{- range $blockquoteFooter := $blockquoteFooters -}} - {{- $blockquoteFooterFixed := $blockquoteFooter | replaceRE "\n

" "

" | -}} - {{- $content = $content | replaceRE $blockquoteFooter $blockquoteFooterFixed -}} +{{- end -}} +{{- $blockquoteFooters = findRE `(?s)\n

(–|—).*

` .Content -}} +{{- range $blockquoteFooter := $blockquoteFooters -}} + {{- $blockquoteFooterFixed := $blockquoteFooter | + replaceRE "\n

" "

" | + -}} + {{- $content = $content | replaceRE $blockquoteFooter $blockquoteFooterFixed -}} {{- end -}} {{- if $empty -}} -- cgit v1.2.3