summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicholasjohnson.ch>2023-01-23 00:00:00 +0000
committerNicholas Johnson <nick@nicholasjohnson.ch>2023-01-23 00:00:00 +0000
commit8cf654fae391eb99d75a9d89750ec7acf1cd5fad60f60846adf2265fd868bb18 (patch)
tree81efd7f0ae7b73ff3dfd5c2fb8fd9119b42a00cf9ed81a4721e1d3c26436a58e
parentde7644ed839b70cb6ed6480d363d6a88336b39150dcc923ab9a475d59c008913 (diff)
downloadhugo-theme-journal-0.2.1.tar.gz
hugo-theme-journal-0.2.1.zip
Fix italics/bold removal regex for Geminiv0.2.1
-rw-r--r--layouts/_default/single.gmi2
1 files changed, 1 insertions, 1 deletions
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 }}