From 8cf654fae391eb99d75a9d89750ec7acf1cd5fad60f60846adf2265fd868bb18 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Mon, 23 Jan 2023 00:00:00 +0000 Subject: Fix italics/bold removal regex for Gemini --- layouts/_default/single.gmi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index 8695a9b..2ea32cd 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -27,7 +27,7 @@ {{- $cur_chunk = $cur_chunk | replaceRE `(?m)\[(.+?)\]\((.+?)\)` (print "=> $2 " $emoji "$1") }} {{- end }} {{- $cur_chunk = $cur_chunk | replaceRE `(?m)^####{1,3}` "###" }} - {{- $cur_chunk = $cur_chunk | replaceRE `(?s)\*{3}(.*?)\*{3}|\*{2}(.*?)\*{2}|\*{1}(.*?)\*{1}` "$1$2$3" }} + {{- $cur_chunk = $cur_chunk | replaceRE `\*{3}(\S.+?\S)\*{3}|\*{2}(\S.+?\S)\*{2}|\*{1}(\S.+?\S)\*{1}` "$1$2$3" }} {{- $cur_chunk = $cur_chunk | replaceRE `(?m)^- ` "* " }} {{- $cur_chunk = $cur_chunk | emojify }} {{- $content = replace $content $before_chunk $cur_chunk 1 }} -- cgit v1.2.3