From 953f0e6d234f64f6a6aa30acda157676c36864599b5ded8f0094357c3c168847 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Sat, 21 Jan 2023 00:00:00 +0000 Subject: Improve italics/bold text parsing --- layouts/_default/single.gmi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layouts') diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index ba22d30..07911df 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -19,7 +19,7 @@ {{- $content = $content | replaceRE `\n\[(.+?)\]\((.+?)\)` (print "\n=> $2 " $emoji "$1") }} {{- end }} {{- $content = $content | replaceRE `\n####{0,3}` "\n###" }} -{{- $content = $content | replaceRE `\*{3}(.+?)\*{3}|\*{2}(.+?)\*{2}|\*{1}(.+?)\*{1}` "$1$2$3$4$5$6" }} +{{- $content = $content | replaceRE `(?s)\*{3}(.*?)\*{3}|\*{2}(.*?)\*{2}|\*{1}(.*?)\*{1}` "$1$2$3" }} {{- $content = $content | replaceRE `\n- ` "\n* " }} {{- $content = $content | emojify }} {{- $content | safeHTML }} -- cgit v1.2.3