diff options
author | tdro <tdro@noreply.example.com> | 2022-11-16 11:57:23 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-11-16 11:57:23 -0500 |
commit | bbb65a782f4db17efa0579168d597e651cd45dbe (patch) | |
tree | 596b4bc5b19ccd1e6aa7cf03e52a0ec1738f3ae1 | |
parent | 9dd073b7ccac09d813abad9f9ae795547d1b8235 (diff) | |
download | canory-bbb65a782f4db17efa0579168d597e651cd45dbe.tar.gz canory-bbb65a782f4db17efa0579168d597e651cd45dbe.tar.bz2 canory-bbb65a782f4db17efa0579168d597e651cd45dbe.zip |
themes/default/layouts/partials/function-content: Blockquotes search multi line before single line0.11.6
Should cover majority of cases for now
-rw-r--r-- | themes/default/layouts/partials/function-content.html | 13 |
1 files 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 "</figure></p>" "</figure>" | -}} -{{- $blockquoteFooters := findRE `(?s)</blockquote>\n<p>(–|—).*</p>` .Content -}} - +{{- $blockquoteFooters := findRE `</blockquote>\n<p>(–|—).*</p>` .Content -}} {{- range $blockquoteFooter := $blockquoteFooters -}} - {{- $blockquoteFooterFixed := $blockquoteFooter | replaceRE "</blockquote>\n<p>" "<footer><cite>" | replaceRE "</p>" "</cite></footer></blockquote>" | -}} - {{- $content = $content | replaceRE $blockquoteFooter $blockquoteFooterFixed -}} +{{- end -}} +{{- $blockquoteFooters = findRE `(?s)</blockquote>\n<p>(–|—).*</p>` .Content -}} +{{- range $blockquoteFooter := $blockquoteFooters -}} + {{- $blockquoteFooterFixed := $blockquoteFooter | + replaceRE "</blockquote>\n<p>" "<footer><cite>" | + replaceRE "</p>" "</cite></footer></blockquote>" | + -}} + {{- $content = $content | replaceRE $blockquoteFooter $blockquoteFooterFixed -}} {{- end -}} {{- if $empty -}} |