diff options
author | tdro <tdro@noreply.example.com> | 2022-11-16 11:14:07 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-11-16 11:14:07 -0500 |
commit | ad375df7a86aa0733946d1bf35157e14e8d4301e (patch) | |
tree | d2aadf606aa59d6c0ce3919e7d40db9e67b3b266 /themes | |
parent | d294ffed41f7e64102fc631548ec8b3f6ef1c7c5 (diff) | |
download | canory-ad375df7a86aa0733946d1bf35157e14e8d4301e.tar.gz canory-ad375df7a86aa0733946d1bf35157e14e8d4301e.tar.bz2 canory-ad375df7a86aa0733946d1bf35157e14e8d4301e.zip |
themes/default/layouts/partials/function-content: Range over all blockquote footers
Diffstat (limited to 'themes')
-rw-r--r-- | themes/default/layouts/partials/function-content.html | 24 |
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>–.*</p>` .Content 1) "" -}} -{{- $blockquoteFooterEmDash := delimit (findRE `</blockquote>\n<p>—.*</p>` .Content 1) "" -}} +{{- $blockquoteFooters := findRE `</blockquote>\n<p>(–|—).*</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." -}} |