aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--layouts/_default/single.gmi4
2 files changed, 3 insertions, 2 deletions
diff --git a/TODO b/TODO
index 539328f..607b9e4 100644
--- a/TODO
+++ b/TODO
@@ -2,4 +2,3 @@
- add tag support
- document "layouts/_default/single.gmi"
- test internationalization
-- rewrite regex in "layouts/_default/single.gmi" to remove nested italics/bolding
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 }}