aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/single.gmi6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi
index 32704a0..09456ab 100644
--- a/layouts/_default/single.gmi
+++ b/layouts/_default/single.gmi
@@ -16,11 +16,11 @@
{{- $content = replace $content $ref_val (print $ref_text "[" $ref_num "]") 1 }}
{{- end }}
{{- else }}
- {{- $content = $content | replaceRE `\n\[(.+?)\]\((.+?)\)` (print "\n=> $2 " $emoji "$1") }}
+ {{- $content = $content | replaceRE `(?m)\[(.+?)\]\((.+?)\)` (print "=> $2 " $emoji "$1") }}
{{- end }}
-{{- $content = $content | replaceRE `\n####{0,3}` "\n###" }}
+{{- $content = $content | replaceRE `(?m)^####{1,3}` "###" }}
{{- $content = $content | replaceRE `(?s)\*{3}(.*?)\*{3}|\*{2}(.*?)\*{2}|\*{1}(.*?)\*{1}` "$1$2$3" }}
-{{- $content = $content | replaceRE `\n- ` "\n* " }}
+{{- $content = $content | replaceRE `(?m)^- ` "* " }}
{{- $content = $content | emojify }}
{{- $content | safeHTML }}
{{- if and (.Page.Params.makerefs | default true) $refs }}