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
1
changelogs/internal/newsfragments/2005.clarification
Normal file
1
changelogs/internal/newsfragments/2005.clarification
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Enforce consistent vertical spacing between paragraphs in endpoint definitions.
|
|
@ -313,7 +313,7 @@ resolve-additional-types.)
|
||||||
Prepend "Required:" to make it part of the first paragraph of the
|
Prepend "Required:" to make it part of the first paragraph of the
|
||||||
description.
|
description.
|
||||||
*/}}
|
*/}}
|
||||||
{{- $description = printf "<strong>Required: </strong>%s" $description -}}
|
{{- $description = printf "<strong>Required: </strong>%s" (default "" $description) -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{/*
|
{{/*
|
||||||
Force the rendering as a block so the description is always inside a
|
Force the rendering as a block so the description is always inside a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue