-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
my urfave/cli version is
( Put the version of urfave/cli that you are using here )
Checklist
- Are you running the latest v2 release?
- Did you check the manual for your release?
- Did you perform a search about this problem?
Dependency Management
- My project is using go modules.
Describe the bug
Right now, the MarkdownTemplate is used for both markdown and man page generation. There's a section added in ed2ee4b which helps for man, but is not helpful in markdown
% {{ .App.Name }} 8
This renders literally and reduces the clean appearance otherwise present.
To reproduce
run a command like m, err := c.App.ToMarkdown() and try to render it directly or in something like hugo
Observed behavior
Expected behavior
I would expect nothing leaked from man into markdown. In this case, it is ok to have the line removed when in markdown.
Additional context
While not specifically annotated about this, the following may be someone else working around this https://github.com/google/skia-buildbot/blob/4c87209ff9378a9befc65d5f93c4040d4fdd5922/go/urfavecli/urfavecli.go#L34
Want to fix this yourself?
To fix this, I would only add that header when man is in use. For example, we can default a new ManTemplate to MarkdownTemplate with that header