mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 02:07:38 +00:00
Fix md generation for kubectl docs
Display usage string, not long help, as code, remove angle brackets from output (.md interprets as tags and hides).
This commit is contained in:
@@ -65,10 +65,10 @@ func genMarkdown(command *cobra.Command, parent, docsDir string) {
|
||||
fmt.Fprintf(out, "## %s\n\n", name)
|
||||
fmt.Fprintf(out, "%s\n\n", short)
|
||||
fmt.Fprintf(out, "### Synopsis\n\n")
|
||||
fmt.Fprintf(out, "```\n%s\n```\n\n", long)
|
||||
fmt.Fprintf(out, "\n%s\n\n", long)
|
||||
|
||||
if command.Runnable() {
|
||||
fmt.Fprintf(out, "%s\n\n", command.UseLine())
|
||||
fmt.Fprintf(out, "```\n%s\n```\n\n", command.UseLine())
|
||||
}
|
||||
|
||||
if len(command.Example) > 0 {
|
||||
|
Reference in New Issue
Block a user