diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-05-02 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-05-02 00:00:00 +0000 |
commit | b872ebadbb64c755f60f867acaa373e9109c0256713891c92dfbdb362dd5dbcf (patch) | |
tree | 105b0bc8bc03dc59c396f088aa9239db924d56ddf1d5955445be5fa8ea6b4d6d /layouts/_default/single.gmi | |
parent | 2edd4b1e19403ac267aebff3221c611ba8a05d04fc27be84d099da235cd06793 (diff) | |
download | hugo-theme-journal-f2925627c76c8de1a65228e046f395cf8990ef3630ad2c08f974b40d50cde72c.tar.gz hugo-theme-journal-f2925627c76c8de1a65228e046f395cf8990ef3630ad2c08f974b40d50cde72c.zip |
Give rationale for bold/italics codev1.2.5
Diffstat (limited to 'layouts/_default/single.gmi')
-rw-r--r-- | layouts/_default/single.gmi | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index fdadecb..b871d67 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -73,6 +73,7 @@ {{ $rendered_text = $rendered_text | replaceRE `(?m)^[\t ]*(\S.+?)[\t ]*\n\-+$` "## $1" -}} {{/* remove bold and italics asterisk symbols */ -}} + {{/* note: this operation is performed in 3 steps to handle nested bold and italics */ -}} {{ $rendered_text = $rendered_text | replaceRE `\*{3}(\S(?:.*\S)?)\*{3}` "$1" -}} {{ $rendered_text = $rendered_text | replaceRE `\*{2}(\S(?:.*\S)?)\*{2}` "$1" -}} {{ $rendered_text = $rendered_text | replaceRE `\*{1}(\S(?:.*\S)?)\*{1}` "$1" -}} |