From 5b3508d95e03e8bba1e9040337a0fe8f49612a94 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 14 Jan 2020 15:17:18 +0100 Subject: [PATCH] Fix man page heading formatting Closes #1040 Signed-off-by: Sascha Grunert --- template.go | 4 +--- testdata/expected-doc-full.man | 7 +------ testdata/expected-doc-full.md | 5 +---- testdata/expected-doc-no-authors.md | 3 +-- testdata/expected-doc-no-commands.md | 5 +---- testdata/expected-doc-no-flags.md | 5 +---- 6 files changed, 6 insertions(+), 23 deletions(-) diff --git a/template.go b/template.go index 1cc4bd624b..7c651f1c80 100644 --- a/template.go +++ b/template.go @@ -71,9 +71,7 @@ OPTIONS: {{end}}{{end}} ` -var MarkdownDocTemplate = `% {{ .App.Name }}(8){{ if .App.Description }} {{ .App.Description }}{{ end }} -{{ range $a := .App.Authors }} -% {{ $a }}{{ end }} +var MarkdownDocTemplate = `% {{ .App.Name }} 8 # NAME diff --git a/testdata/expected-doc-full.man b/testdata/expected-doc-full.man index f28f4c78b3..2bea50731e 100644 --- a/testdata/expected-doc-full.man +++ b/testdata/expected-doc-full.man @@ -1,10 +1,5 @@ .nh -.TH greet(8) - -.SH Harrison harrison@lolwut.com -\[la]mailto:harrison@lolwut.com\[ra] -Oliver Allen oliver@toyshop.com -\[la]mailto:oliver@toyshop.com\[ra] +.TH greet 8 .SH NAME .PP diff --git a/testdata/expected-doc-full.md b/testdata/expected-doc-full.md index 5bfb01ed46..f272274061 100644 --- a/testdata/expected-doc-full.md +++ b/testdata/expected-doc-full.md @@ -1,7 +1,4 @@ -% greet(8) - -% Harrison -% Oliver Allen +% greet 8 # NAME diff --git a/testdata/expected-doc-no-authors.md b/testdata/expected-doc-no-authors.md index a49481a4f8..f272274061 100644 --- a/testdata/expected-doc-no-authors.md +++ b/testdata/expected-doc-no-authors.md @@ -1,5 +1,4 @@ -% greet(8) - +% greet 8 # NAME diff --git a/testdata/expected-doc-no-commands.md b/testdata/expected-doc-no-commands.md index f82f642a0b..adaedb43e0 100644 --- a/testdata/expected-doc-no-commands.md +++ b/testdata/expected-doc-no-commands.md @@ -1,7 +1,4 @@ -% greet(8) - -% Harrison -% Oliver Allen +% greet 8 # NAME diff --git a/testdata/expected-doc-no-flags.md b/testdata/expected-doc-no-flags.md index c32a9fccee..2994593e8a 100644 --- a/testdata/expected-doc-no-flags.md +++ b/testdata/expected-doc-no-flags.md @@ -1,7 +1,4 @@ -% greet(8) - -% Harrison -% Oliver Allen +% greet 8 # NAME