davideisinger.com

My personal website
Log | Files | Refs | README

commit f4f743ba2acf2dda1aa73f30ff867236640f8573
parent 7e83527e77225d0837661706a2d13ee0e8de586e
Author: David Eisinger <[email protected]>
Date:   Wed, 19 Feb 2025 00:41:37 -0500

Squeeze multi-paragraph bullets in GMI

Diffstat:
Mthemes/v2/layouts/partials/gemtext.gmi | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/themes/v2/layouts/partials/gemtext.gmi b/themes/v2/layouts/partials/gemtext.gmi @@ -47,12 +47,13 @@ {{- /* Misc. markup fixes */ -}} {{- $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)^[\*-]{3}$` "✱ ✱ ✱" -}} {{- $content = $content | replaceRE `=> /(.+\.pdf)` (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 | safeHTML -}}