diff options
author | Nicholas Johnson <mail@nicholasjohnson.ch> | 2024-06-18 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <mail@nicholasjohnson.ch> | 2024-06-18 00:00:00 +0000 |
commit | 5dedbac7a3de4fcbf4d13dbeeec82dd2f277c21e6d7f201def813a6776196e54 (patch) | |
tree | a37e6e92d4e7e861f0ac62c72a0bc2fb4f7e5e6d0e3178abcc9d33267a40b590 /layouts/_default | |
parent | 971d8f233f59d578410b95f6aa44821084690724740917217769924f1aa6a430 (diff) | |
download | hugo-theme-journal-4dfe82e6d56cd259482adc288475da0708d2f45f7c7381b3b8e70258f13d0690.tar.gz hugo-theme-journal-4dfe82e6d56cd259482adc288475da0708d2f45f7c7381b3b8e70258f13d0690.zip |
Correct reference index countingv1.3.4
Diffstat (limited to 'layouts/_default')
-rw-r--r-- | layouts/_default/single.gmi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi index c9b6896..5c470ab 100644 --- a/layouts/_default/single.gmi +++ b/layouts/_default/single.gmi @@ -37,8 +37,9 @@ {{ $chunk_refs := findRESubmatch `!?\[[\t ]*(.+?)[\t ]*\]\([\t ]*(.+?)(?:[\t ]+"(.+?)")?[\t ]*\)` $rendered_text -}} {{ range $chunk_refs -}} + {{ $ref_index = add $ref_index 1 -}} {{ $chunk_ref := dict - "index" (add $ref_index 1) + "index" $ref_index "text" (index . 1) "link" (index . 2) "title" (index . 3) |