Skip to content

Commit

Permalink
skip empty description
Browse files Browse the repository at this point in the history
Don't print the description of a command as a subtitle
when generating a manpage if the description is empty.
This commit addresses #9430

Signed-off-by: Harumi Kuno <harumi.kuno@hpe.com>
  • Loading branch information
hkuno committed Aug 30, 2021
1 parent 9ed0542 commit b13e1ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sphinx/writers/manpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def __init__(self, document: nodes.document, builder: Builder) -> None:
def header(self) -> str:
tmpl = (".TH \"%(title_upper)s\" \"%(manual_section)s\""
" \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n"
".SH NAME\n"
".SH NAME\n")
if self._docinfo['subtitle']:
"%(title)s \\- %(subtitle)s\n")
return tmpl % self._docinfo

Expand Down

0 comments on commit b13e1ee

Please sign in to comment.