diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-12-31 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-12-31 00:00:00 +0000 |
commit | c6eed1152cd5273fe8c03a295ed1adfa59223a19cd576ee16f5c4a601f859d0e (patch) | |
tree | 19abd044647e7cdc35c1ff3340e04275d5e79abacba9e9d98242eb904c10d029 | |
parent | 8c650e2a361500797fe7ab7f01b8544cad6431e23c8f76c1668546baa04cb7dc (diff) | |
download | hugo-theme-journal-c6eed1152cd5273fe8c03a295ed1adfa59223a19cd576ee16f5c4a601f859d0e.tar.gz hugo-theme-journal-c6eed1152cd5273fe8c03a295ed1adfa59223a19cd576ee16f5c4a601f859d0e.zip |
Convert Markdown's ol to gemtext's ulv1.2.0
-rw-r--r-- | layouts/_default/single.gmi | 3 |
1 files changed, 3 insertions, 0 deletions
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 */ -}} |