Merge pull request #22673 from shuuji3/en/fix-glossary-definition-shortcodes-bug

Fix a bug of shortcode 'glossary_definition' which selects a wrong term
This commit is contained in:
Kubernetes Prow Robot 2020-07-26 20:48:16 -07:00 committed by GitHub
commit 98fbbed9e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 -}}