Skip to content

Commit

Permalink
fix: Fix the github pages ASCII art (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFaucherre authored Feb 14, 2023
1 parent 8d5e0a2 commit 901243e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions md_docs/md_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ func GenMarkdownTree(cmd *cobra.Command, dir string) error {
// GenMarkdownTreeCustom is the the same as GenMarkdownTree, but
// with custom filePrepender and linkHandler.
func GenMarkdownTreeCustom(cmd *cobra.Command, dir string, filePrepender, linkHandler func(string) string) error {
// There is a problem with the tool transforming the markdown into html, the tool transforms the
// circleci ascii art bad. By forcing it into a codeblock the formatting problem disappear
if cmd.Root() == cmd {
oldLong := cmd.Long
cmd.Long = fmt.Sprintf("```%s\n```", oldLong)
defer func() {
cmd.Long = oldLong
}()
}
for _, c := range cmd.Commands() {
if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() {
continue
Expand Down

0 comments on commit 901243e

Please sign in to comment.