mirror of https://github.com/docker/docs.git
fix: ignore empty default values for cli flags
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
47ede73397
commit
d8c4f4f353
|
|
@ -85,7 +85,12 @@
|
|||
<tr>
|
||||
<td>{{ with .option }}<code>--{{ . }}</code>{{ end }}</td>
|
||||
<td>{{ with .shorthand }}<code>-{{ . }}</code>{{ end }}</td>
|
||||
<td>{{ with .default_value }}<code>{{ . }}</code>{{ end }}</td>
|
||||
{{ $skipDefault := `[],map[],false,0,0s,default,'',""` }}
|
||||
<td>
|
||||
{{ with .default_value }}
|
||||
{{ cond (in $skipDefault .) "" (printf "<code>%s</code>" . | safeHTML) }}
|
||||
{{ end }}
|
||||
</td>
|
||||
<td>
|
||||
{{ with .min_api_version }}
|
||||
{{ partial "components/badge.html" (dict "color" "blue" "content" (printf "API %s+" .)) }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue