summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.gmi4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi
index 1f97b7e..13ef9b4 100644
--- a/layouts/_default/single.gmi
+++ b/layouts/_default/single.gmi
@@ -19,9 +19,9 @@
{{- $rendered_text := print $before_pre $after_pre }}
- {{- $chunk_refs := findRE `!?\[(.+?)\]\((.+?)(?:\s+".*?")?\)` $rendered_text }}
- {{- $scratch.Add "refs" $chunk_refs }}
{{- if ($.Page.Params.makerefs | default true) }}
+ {{- $chunk_refs := findRESubmatch `!?\[(.+?)\]\((.+?)(?:\s+".*?")?\)` $rendered_text }}
+ {{- $scratch.Add "refs" $chunk_refs }}
{{- range $chunk_refs }}
{{- $ref_index = add $ref_index 1 }}
{{- $ref_text := replaceRE `!?\[(.+?)\]\((.+?)(?:\s+".*?")?\)` "$1" . 1 }}