aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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." -}}