Fix regression introduced when inlining "Required" (#2005)
If the description is not set in the object definition, Hugo generates a weird string after "Required": `%!s(<nil>)`. To avoid that, we default the description to an empty string when it is not set. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
c16788f991
commit
f3130f70e6
2 changed files with 2 additions and 1 deletions
|
@ -313,7 +313,7 @@ resolve-additional-types.)
|
|||
Prepend "Required:" to make it part of the first paragraph of the
|
||||
description.
|
||||
*/}}
|
||||
{{- $description = printf "<strong>Required: </strong>%s" $description -}}
|
||||
{{- $description = printf "<strong>Required: </strong>%s" (default "" $description) -}}
|
||||
{{ end -}}
|
||||
{{/*
|
||||
Force the rendering as a block so the description is always inside a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue