mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Prune trailing newlines when enums are disabled
This commit is contained in:
parent
d78de56d76
commit
d0967bbe5e
@ -68,7 +68,7 @@ func pruneEnums(schema *spec.Schema) *spec.Schema {
|
||||
// note that the new lines before the header should be removed too,
|
||||
// thus the slice range.
|
||||
clone()
|
||||
schema.Description = schema.Description[:headerIndex]
|
||||
schema.Description = strings.TrimSpace(schema.Description[:headerIndex])
|
||||
}
|
||||
if len(schema.Enum) != 0 {
|
||||
// remove the enum field
|
||||
|
Loading…
Reference in New Issue
Block a user