From c6eed1152cd5273fe8c03a295ed1adfa59223a19cd576ee16f5c4a601f859d0e Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Sun, 31 Dec 2023 00:00:00 +0000 Subject: Convert Markdown's ol to gemtext's ul --- layouts/_default/single.gmi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'layouts/_default') diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index e6d6fdf..587687c 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -80,6 +80,9 @@ {{/* convert alternative unordered lists symbols to asterisks */ -}} {{ $rendered_text = $rendered_text | replaceRE `(?m)^[-+] ` "* " -}} + {{/* convert Markdown ordered list item to gemtext unordered list item /* -}} + {{ $rendered_text = $rendered_text | replaceRE `^[1-9]\d*\.[\t ]+(.*?)[\t ]*$` "$1" -}} + {{ $rendered_text = $rendered_text | emojify -}} {{/* demux regex matches above and below preformatted text */ -}} -- cgit v1.2.3