aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/single.gmi8
1 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi
index f00b1d1..a8be38d 100644
--- a/layouts/_default/single.gmi
+++ b/layouts/_default/single.gmi
@@ -13,7 +13,7 @@
{{ $content := chomp (.RawContent) -}}
{{ $scratch := newScratch -}}
-{{/* if content begins with a heading, add an extra space */ -}}
+{{/* if content begins with a heading, add an extra newline */ -}}
{{ if (findRE `^#{1,6} ` $content 1) }}
{{ end -}}
@@ -68,7 +68,7 @@
{{/* trim extra heading symbols */ -}}
{{ $rendered_text = $rendered_text | replaceRE `(?m)^####{1,3} ` "### " -}}
- {{/* convert alternative heading syntax to number signs */ -}}
+ {{/* convert Markdown alternative heading syntax to gemtext heading syntax */ -}}
{{ $rendered_text = $rendered_text | replaceRE `(?m)^[\t ]*(\S.+?)[\t ]*\n\=+$` "# $1" -}}
{{ $rendered_text = $rendered_text | replaceRE `(?m)^[\t ]*(\S.+?)[\t ]*\n\-+$` "## $1" -}}
@@ -77,10 +77,10 @@
{{ $rendered_text = $rendered_text | replaceRE `\*{2}(\S|\S.*?\S)\*{2}` "$1" -}}
{{ $rendered_text = $rendered_text | replaceRE `\*{1}(\S|\S.*?\S)\*{1}` "$1" -}}
- {{/* convert alternative unordered lists symbols to asterisks */ -}}
+ {{/* convert Markdown alternative unordered list syntax to gemtext unordered list syntax */ -}}
{{ $rendered_text = $rendered_text | replaceRE `(?m)^[-+] ` "* " -}}
- {{/* convert Markdown ordered list item to gemtext unordered list item */ -}}
+ {{/* convert Markdown ordered list items to gemtext unordered list items */ -}}
{{ $rendered_text = $rendered_text | replaceRE `(?m)^[1-9]\d*\.[\t ]+(.*?)[\t ]*$` "* $1" -}}
{{ $rendered_text = $rendered_text | emojify -}}