Squeeze multi-paragraph bullets in GMI

This commit is contained in:
David Eisinger
2025-02-19 00:41:37 -05:00
parent 7e83527e77
commit f4f743ba2a

View File

@@ -47,12 +47,13 @@
{{- /* Misc. markup fixes */ -}} {{- /* Misc. markup fixes */ -}}
{{- $content = $content | replaceRE `<!--more-->\n+` "" -}} {{- $content = $content | replaceRE `<!--more-->\n+` "" -}}
{{- $content = $content | replaceRE `(?m)^ >` ">" -}} {{- $content = $content | replaceRE `(?m)^[ ]+>` ">" -}}
{{- $content = $content | replaceRE `(?m)^ \*` "* ⇢" -}} {{- $content = $content | replaceRE `(?m)^ \*` "* ⇢" -}}
{{- $content = $content | replaceRE `(?m)^- ` "* " -}} {{- $content = $content | replaceRE `(?m)^- ` "* " -}}
{{- $content = $content | replaceRE `(?m)^[\*-]{3}$` "✱ ✱ ✱" -}} {{- $content = $content | replaceRE `(?m)^[\*-]{3}$` "✱ ✱ ✱" -}}
{{- $content = $content | replaceRE `=> /(.+\.pdf)` (printf "=> %s$1" site.BaseURL) -}} {{- $content = $content | replaceRE `=> /(.+\.pdf)` (printf "=> %s$1" site.BaseURL) -}}
{{- $content = $content | replaceRE `=> /(elsewhere[^ ])` (printf "=> %s$1" site.BaseURL) -}} {{- $content = $content | replaceRE `=> /(elsewhere[^ ])` (printf "=> %s$1" site.BaseURL) -}}
{{- $content = $content | replaceRE `(?m)^(\* [^\n]+)\n\n ` "$1 " -}}
{{- $content = $content | replaceRE `(?m)\n{3,}` "\n\n" }} {{- $content = $content | replaceRE `(?m)\n{3,}` "\n\n" }}
{{- $content | safeHTML -}} {{- $content | safeHTML -}}