Skip to content

Man page generation wrong in latest release #1049

@dionysius

Description

@dionysius

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)

diff --git a/tmp/man-from-005/prog.8 b/tmp/man-from-006/prog.8
index 166d0d1..afda3e3 100644
--- a/tmp/man-from-005/prog.8
+++ b/tmp/man-from-006/prog.8
@@ -1,7 +1,7 @@
-.TH "FOO" "8" "Mar 2020" "The Team" "System Manager's Manual" 
 .nh
-.ad l
-
+.TH FOO(8)Mar 2020
+The Team
+System Manager's Manual

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):

WARNING: go-md2man does not handle node type HTMLSpan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions