Revert "[gh config] Escape pipe symbol in Long desc for website manual"

This commit is contained in:
Kynan Ware 2025-05-20 08:54:30 -06:00 committed by GitHub
parent e0d7ad772f
commit 944543863a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -142,8 +142,7 @@ func genMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string)
fmt.Fprintf(w, "```\n%s\n```\n\n", cmd.UseLine())
}
if hasLong {
longWithEscapedPipe := strings.ReplaceAll(cmd.Long, "|", "|")
fmt.Fprintf(w, "%s\n\n", longWithEscapedPipe)
fmt.Fprintf(w, "%s\n\n", cmd.Long)
}
for _, g := range root.GroupedCommands(cmd) {

View file

@ -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\n")
longDoc.WriteString("Current respected settings:\n")
for _, co := range config.Options {
longDoc.WriteString(fmt.Sprintf("- `%s`: %s", co.Key, co.Description))
if len(co.AllowedValues) > 0 {