{{- $pageContext := . -}} {{- $content := $pageContext.Content -}} {{- $expired := and .ExpiryDate (ge now.Unix .ExpiryDate.Unix) -}} {{- $brokenBlockquotes := findRE `(?sU)\n

(–|—).*

` .Content -}} {{- range $brokenBlockquote := $brokenBlockquotes -}} {{- $fixedBlockquote := $brokenBlockquote | replaceRE "\n

" "

" | -}} {{- $content = replace $content $brokenBlockquote $fixedBlockquote -}} {{- end -}} {{- if not $content -}} {{- $content = "This message contains no content." -}} {{- end -}} {{- if $expired -}} {{- $content = "This message has expired." -}} {{- end -}} {{- return $content -}}