diff --git a/cmd/finch/doc.TEMPLATE b/cmd/finch/doc.TEMPLATE index af7477d63..6aa00844f 100644 --- a/cmd/finch/doc.TEMPLATE +++ b/cmd/finch/doc.TEMPLATE @@ -2,9 +2,9 @@ title: "{{ .CmdPath }}" --- -## {{ .CmdPath }}{{if gt (len .Description) 0}} +## {{ .CmdPath }} -{{ .Description }} +{{if gt (len .Description) 0}}{{ .Description }} {{end}}{{if gt (len .Properties) 0}}### Properties diff --git a/cmd/finch/gen_docs_test.go b/cmd/finch/gen_docs_test.go index 9429804b0..bf595f735 100644 --- a/cmd/finch/gen_docs_test.go +++ b/cmd/finch/gen_docs_test.go @@ -96,9 +96,10 @@ func TestGenDocsAction_runAdapter(t *testing.T) { require.Equal(t, string(buf), fmt.Sprintf(`--- title: "test-command" --- + ## test-command -%s +%sbash test-command [flags] %s `, codeBlock, codeBlock))