Skip to content

Commit 98fbbed

Browse files
authored
Merge pull request #22673 from shuuji3/en/fix-glossary-definition-shortcodes-bug
Fix a bug of shortcode 'glossary_definition' which selects a wrong term
2 parents ea8ab91 + 97b22f9 commit 98fbbed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layouts/shortcodes/glossary_definition.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{- $prepend := .Get "prepend" }}
55
{{- $glossaryBundle := site.GetPage "page" "docs/reference/glossary" -}}
66
{{- $glossaryItems := $glossaryBundle.Resources.ByType "page" -}}
7-
{{- $term_info := $glossaryItems.GetMatch (printf "%s*" $id ) -}}
7+
{{- $term_info := $glossaryItems.GetMatch (printf "%s.md" $id ) -}}
88
{{- if not $term_info -}}
99
{{- 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 -}}
1010
{{- end -}}

0 commit comments

Comments
 (0)