aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-11-16 11:14:07 -0500
committertdro <tdro@noreply.example.com>2022-11-16 11:14:07 -0500
commitad375df7a86aa0733946d1bf35157e14e8d4301e (patch)
treed2aadf606aa59d6c0ce3919e7d40db9e67b3b266
parentd294ffed41f7e64102fc631548ec8b3f6ef1c7c5 (diff)
downloadcanory-ad375df7a86aa0733946d1bf35157e14e8d4301e.tar.gz
canory-ad375df7a86aa0733946d1bf35157e14e8d4301e.tar.bz2
canory-ad375df7a86aa0733946d1bf35157e14e8d4301e.zip
themes/default/layouts/partials/function-content: Range over all blockquote footers
-rw-r--r--themes/default/layouts/partials/function-content.html24
1 files 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 "</figure></p>" "</figure>" |
-}}
-{{- $blockquoteFooterEnDash := delimit (findRE `</blockquote>\n<p>&ndash;.*</p>` .Content 1) "" -}}
-{{- $blockquoteFooterEmDash := delimit (findRE `</blockquote>\n<p>&mdash;.*</p>` .Content 1) "" -}}
+{{- $blockquoteFooters := findRE `</blockquote>\n<p>(&ndash;|&mdash;).*</p>` .Content -}}
-{{- $blockquoteFooterFixedEnDash := $blockquoteFooterEnDash |
- replaceRE "</blockquote>\n<p>" "<footer><cite>" |
- replaceRE "</p>" "</cite></footer></blockquote>" |
--}}
+{{- range $blockquoteFooter := $blockquoteFooters -}}
-{{- $blockquoteFooterFixedEmDash := $blockquoteFooterEmDash |
- replaceRE "</blockquote>\n<p>" "<footer><cite>" |
- replaceRE "</p>" "</cite></footer></blockquote>" |
--}}
+ {{- $blockquoteFooterFixed := $blockquoteFooter |
+ replaceRE "</blockquote>\n<p>" "<footer><cite>" |
+ replaceRE "</p>" "</cite></footer></blockquote>" |
+ -}}
-{{-
- $content = $content |
- replaceRE $blockquoteFooterEnDash $blockquoteFooterFixedEnDash |
- replaceRE $blockquoteFooterEmDash $blockquoteFooterFixedEmDash |
--}}
+ {{- $content = $content | replaceRE $blockquoteFooter $blockquoteFooterFixed -}}
+
+{{- end -}}
{{- if $empty -}}
{{- $content = "This message contains no content." -}}