Skip to content

Commit 0e9ca70

Browse files
authored
Merge pull request #2 from mlaventure/let-examples-be-processed
Allow examples to be formatted
2 parents a3c0924 + 54e37c5 commit 0e9ca70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/man_docs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func GenManTreeFromOpts(cmd *cobra.Command, opts GenManTreeOptions) error {
6666
separator = opts.CommandSeparator
6767
}
6868
basename := strings.Replace(cmd.CommandPath(), " ", separator, -1)
69-
filename := filepath.Join(opts.Path, basename + "." + section)
69+
filename := filepath.Join(opts.Path, basename+"."+section)
7070
f, err := os.Create(filename)
7171
if err != nil {
7272
return err
@@ -197,7 +197,7 @@ func genMan(cmd *cobra.Command, header *GenManHeader) []byte {
197197
manPrintOptions(buf, cmd)
198198
if len(cmd.Example) > 0 {
199199
fmt.Fprintf(buf, "# EXAMPLE\n")
200-
fmt.Fprintf(buf, "```\n%s\n```\n", cmd.Example)
200+
fmt.Fprintf(buf, "\n%s\n\n", cmd.Example)
201201
}
202202
if hasSeeAlso(cmd) {
203203
fmt.Fprintf(buf, "# SEE ALSO\n")

0 commit comments

Comments
 (0)