diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.gmi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index 93c1439..e6d6fdf 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -68,6 +68,10 @@ {{/* trim extra heading symbols */ -}} {{ $rendered_text = $rendered_text | replaceRE `(?m)^####{1,3}` "###" -}} + {{/* convert alternative heading syntax to number signs */ -}} + {{ $rendered_text = $rendered_text | replaceRE `(?m)^[\t ]*(\S.+?)[\t ]*\n\=+$` "# $1" -}} + {{ $rendered_text = $rendered_text | replaceRE `(?m)^[\t ]*(\S.+?)[\t ]*\n\-+$` "## $1" -}} + {{/* remove bold and italics asterisk symbols */ -}} {{ $rendered_text = $rendered_text | replaceRE `\*{3}(\S|\S.*?\S)\*{3}` "$1" -}} {{ $rendered_text = $rendered_text | replaceRE `\*{2}(\S|\S.*?\S)\*{2}` "$1" -}} |