aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-11-16 11:57:23 -0500
committertdro <tdro@noreply.example.com>2022-11-16 11:57:23 -0500
commitbbb65a782f4db17efa0579168d597e651cd45dbe (patch)
tree596b4bc5b19ccd1e6aa7cf03e52a0ec1738f3ae1
parent9dd073b7ccac09d813abad9f9ae795547d1b8235 (diff)
downloadcanory-0.11.6.tar.gz
canory-0.11.6.tar.bz2
canory-0.11.6.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.html13
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>(&ndash;|&mdash;).*</p>` .Content -}}
-
+{{- $blockquoteFooters := findRE `</blockquote>\n<p>(&ndash;|&mdash;).*</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>(&ndash;|&mdash;).*</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 -}}