summaryrefslogtreecommitdiff
path: root/layouts/_default/single.gmi
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicholasjohnson.ch>2023-02-05 00:00:00 +0000
committerNicholas Johnson <nick@nicholasjohnson.ch>2023-02-05 00:00:00 +0000
commite2b45e248570e47dbdb85a2538dc416ce75f34f0d2e00de6f782f2a4790cf05b (patch)
treedd911def1be042daddbc7bd535ae3cd7216db585d1117f42d97c6d607167ab3e /layouts/_default/single.gmi
parentb9e449e82104ead0e3b7a95c0e3e49363a4f4ea0eadada5016a9679ad9932351 (diff)
downloadhugo-theme-journal-0.3.3.tar.gz
hugo-theme-journal-0.3.3.zip
Fix Gemini bold/italics removal regexv0.3.3
Diffstat (limited to 'layouts/_default/single.gmi')
-rw-r--r--layouts/_default/single.gmi4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi
index e93ee81..e7e4d0c 100644
--- a/layouts/_default/single.gmi
+++ b/layouts/_default/single.gmi
@@ -30,7 +30,9 @@
{{- $rendered_text = $rendered_text | replaceRE `(?m)^\[(.+?)\]\((.+?)\)$` (print "=> $2 " $emoji "$1") }}
{{- end }}
{{- $rendered_text = $rendered_text | replaceRE `(?m)^####{1,3}` "###" }}
- {{- $rendered_text = $rendered_text | replaceRE `\*{3}(\S.+?\S)\*{3}|\*{2}(\S.+?\S)\*{2}|\*{1}(\S.+?\S)\*{1}` "$1$2$3" }}
+ {{- $rendered_text = $rendered_text | replaceRE `\*{3}(\S|\S.*?\S)\*{3}` "$1" }}
+ {{- $rendered_text = $rendered_text | replaceRE `\*{2}(\S|\S.*?\S)\*{2}` "$1" }}
+ {{- $rendered_text = $rendered_text | replaceRE `\*{1}(\S|\S.*?\S)\*{1}` "$1" }}
{{- $rendered_text = $rendered_text | replaceRE `(?m)^- ` "* " }}
{{- $rendered_text = $rendered_text | emojify }}