diff options
author | tdro <tdro@noreply.example.com> | 2022-11-16 10:47:40 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-11-16 10:47:40 -0500 |
commit | d294ffed41f7e64102fc631548ec8b3f6ef1c7c5 (patch) | |
tree | f4dccccc17e6d07046f3fb0299ba5d6d4b8a03a0 /themes/default/layouts/partials/function-content.html | |
parent | db3820c0c5d84226e01d6f1dcef10929979935ba (diff) | |
download | canory-d294ffed41f7e64102fc631548ec8b3f6ef1c7c5.tar.gz canory-d294ffed41f7e64102fc631548ec8b3f6ef1c7c5.tar.bz2 canory-d294ffed41f7e64102fc631548ec8b3f6ef1c7c5.zip |
themes/default/layouts/partials/function-content: Make block quotes easier to write
Remove footer since it's no longer needed
Diffstat (limited to 'themes/default/layouts/partials/function-content.html')
-rw-r--r-- | themes/default/layouts/partials/function-content.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/function-content.html b/themes/default/layouts/partials/function-content.html index de68946..bc90549 100644 --- a/themes/default/layouts/partials/function-content.html +++ b/themes/default/layouts/partials/function-content.html @@ -10,6 +10,25 @@ replaceRE "</figure></p>" "</figure>" | -}} +{{- $blockquoteFooterEnDash := delimit (findRE `</blockquote>\n<p>–.*</p>` .Content 1) "" -}} +{{- $blockquoteFooterEmDash := delimit (findRE `</blockquote>\n<p>—.*</p>` .Content 1) "" -}} + +{{- $blockquoteFooterFixedEnDash := $blockquoteFooterEnDash | + replaceRE "</blockquote>\n<p>" "<footer><cite>" | + replaceRE "</p>" "</cite></footer></blockquote>" | +-}} + +{{- $blockquoteFooterFixedEmDash := $blockquoteFooterEmDash | + replaceRE "</blockquote>\n<p>" "<footer><cite>" | + replaceRE "</p>" "</cite></footer></blockquote>" | +-}} + +{{- + $content = $content | + replaceRE $blockquoteFooterEnDash $blockquoteFooterFixedEnDash | + replaceRE $blockquoteFooterEmDash $blockquoteFooterFixedEmDash | +-}} + {{- if $empty -}} {{- $content = "This message contains no content." -}} {{- end -}} |