Merge pull request #10371 from iamazeem/10348-escape-pipe-in-long-description-for-website-manual
[gh config] Escape pipe symbol in Long desc for website manual
This commit is contained in:
commit
7d7fc60303
2 changed files with 3 additions and 2 deletions
|
|
@ -142,7 +142,8 @@ func genMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string)
|
|||
fmt.Fprintf(w, "```\n%s\n```\n\n", cmd.UseLine())
|
||||
}
|
||||
if hasLong {
|
||||
fmt.Fprintf(w, "%s\n\n", cmd.Long)
|
||||
longWithEscapedPipe := strings.ReplaceAll(cmd.Long, "|", "|")
|
||||
fmt.Fprintf(w, "%s\n\n", longWithEscapedPipe)
|
||||
}
|
||||
|
||||
for _, g := range root.GroupedCommands(cmd) {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import (
|
|||
func NewCmdConfig(f *cmdutil.Factory) *cobra.Command {
|
||||
longDoc := strings.Builder{}
|
||||
longDoc.WriteString("Display or change configuration settings for gh.\n\n")
|
||||
longDoc.WriteString("Current respected settings:\n")
|
||||
longDoc.WriteString("Current respected settings:\n\n")
|
||||
for _, co := range config.Options {
|
||||
longDoc.WriteString(fmt.Sprintf("- `%s`: %s", co.Key, co.Description))
|
||||
if len(co.AllowedValues) > 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue