-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Man page generation wrong in latest release #1049
Comments
This issue is being marked as stale due to a long period of inactivity |
I've bisected this to 77e4d5a (thanks for the example code), which updates md2man to v2.0.0 . |
I'm still using |
Seems like we are facing the same issue when while building the docker package in Debian. Since the go-md2man v2 transition, we can't build the documentation anymore:
For the full bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=971789 After some investigation, I observe the same changes in the man pages as the one showed above by @dionysius. And that's why We solved that by patching This patch applies to the lines: Lines 148 to 152 in b97b5ea
Note that I'm not familiar with |
@elboulangero thank you. Do you mind opening a PR? Perhaps this way there is a better chance that the bug will be fixed |
This addresses spf13#1049 by changing the format of the generated Markdown input.
I've noticed further changes in the generated manpages (to be precise: I've only looked at the generated manpages for restic). A CLI option used to look like this:
Whereas now its
with a different indentation level for each option description, which looks really chaotic, e.g.
|
PR opened at #1256 |
Also opened cpuguy83/go-md2man#65 to make go-md2man accept the format (reviews welcome!) |
This addresses spf13#1049 by changing the format of the generated Markdown input.
This addresses #1049 by changing the format of the generated Markdown input.
Version 1.1.1 is live: https://github.com/spf13/cobra/releases/tag/v1.1.1 Feel free to re-open this issue if there are still problems! |
Cobra 1.1.1 fixes internal formatting for go-md2man v2 (which caused man page generation e.g. "hugo gen man" to be broken since Cobra 0.0.6). See spf13/cobra#1049 for context.
There's a difference between cobra 0.0.5 and 0.0.6 negatively affecting the resulting man files:
Example: https://play.golang.org/p/zcjf0eQ35xj (copy it locally to compare with v0.0.5)
The resulting visual representation is wrong: see
man -l /tmp/man-from-006/prog.8
.While we're at it, can we maybe have a golden file/dir for GenMan and GenManTree to detect syntax changes?
I also get the following during execution locally, which might be related (when using GenManTree):
The text was updated successfully, but these errors were encountered: