aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicholasjohnson.ch>2023-01-21 00:00:00 +0000
committerNicholas Johnson <nick@nicholasjohnson.ch>2023-01-22 00:00:00 +0000
commit953f0e6d234f64f6a6aa30acda157676c36864599b5ded8f0094357c3c168847 (patch)
treeae8b50dee31f1a75a46d0431102727f0b31f685e515fcc7446fbd8bcd1bd1c5d /layouts/_default
parent48dd0fb26f7c667c7a7edeead15dfab0750623220a699ce16889ce911a440dc1 (diff)
downloadhugo-theme-journal-953f0e6d234f64f6a6aa30acda157676c36864599b5ded8f0094357c3c168847.tar.gz
hugo-theme-journal-953f0e6d234f64f6a6aa30acda157676c36864599b5ded8f0094357c3c168847.zip
Improve italics/bold text parsing
Diffstat (limited to 'layouts/_default')
-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 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 }}