From 97b22f9fbe14218005562d8ce3a69fffe482a178 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Fri, 24 Jul 2020 01:40:15 +0900 Subject: [PATCH] Fix a bug of shortcode 'glossary_definition' which selects a wrong term. --- layouts/shortcodes/glossary_definition.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/shortcodes/glossary_definition.html b/layouts/shortcodes/glossary_definition.html index 2104d1dbc6..76d38fc14b 100644 --- a/layouts/shortcodes/glossary_definition.html +++ b/layouts/shortcodes/glossary_definition.html @@ -4,7 +4,7 @@ {{- $prepend := .Get "prepend" }} {{- $glossaryBundle := site.GetPage "page" "docs/reference/glossary" -}} {{- $glossaryItems := $glossaryBundle.Resources.ByType "page" -}} -{{- $term_info := $glossaryItems.GetMatch (printf "%s*" $id ) -}} +{{- $term_info := $glossaryItems.GetMatch (printf "%s.md" $id ) -}} {{- if not $term_info -}} {{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./docs/reference/glossary/* for a full list" site.Language.Lang .Page.Path $id -}} {{- end -}}