Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 9b4b755

Browse files
author
R. S. Doiel
committed
Quick Save
1 parent 8500601 commit 9b4b755

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

manpage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (c *Cli) GenerateManPage(w io.Writer) {
213213
//FIXME: Need to convert Markdown of examples into nroff with
214214
// with man macros.
215215
fmt.Fprintf(w, ".SH EXAMPLES\n")
216-
fmt.Fprintf(w, ".TP\n%s\n", md2man(section))
216+
fmt.Fprintf(w, "\n%s\n", md2man(section))
217217
}
218218

219219
/*

markdown.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ func (c *Cli) GenerateMarkdownDocs(w io.Writer) {
3232
}
3333
fmt.Fprintf(w, "\n# USAGE\n\n %s\n\n", strings.Join(parts, " "))
3434

35-
if section, ok := c.Documentation["description"]; ok == true {
35+
if section, ok := c.Documentation["synopsis"]; ok == true {
3636
fmt.Fprintf(w, "## SYNOPSIS\n\n%s\n\n", section)
3737
}
3838

39+
if section, ok := c.Documentation["description"]; ok == true {
40+
fmt.Fprintf(w, "## DESCRIPTION\n\n%s\n\n", section)
41+
}
42+
3943
if len(c.env) > 0 {
4044
fmt.Fprintf(w, "## ENVIRONMENT\n\n")
4145
if len(c.options) > 0 {
@@ -61,6 +65,7 @@ func (c *Cli) GenerateMarkdownDocs(w io.Writer) {
6165
if len(c.options) > 0 {
6266
fmt.Fprintf(w, "## OPTIONS\n\n")
6367
parts := []string{}
68+
parts = append(parts, "Below are a set of options available.")
6469
if len(c.env) > 0 {
6570
parts = append(parts, "Options will override any corresponding environment settings.")
6671
}
@@ -116,7 +121,7 @@ func (c *Cli) GenerateMarkdownDocs(w io.Writer) {
116121
if len(c.Documentation) > 0 {
117122
keys := []string{}
118123
for k, _ := range c.actions {
119-
if k != "description" && k != "examples" && k != "index" {
124+
if k != "synopsis" && k != "description" && k != "examples" && k != "index" {
120125
keys = append(keys, k)
121126
}
122127
}

0 commit comments

Comments
 (0)