Skip to content

Commit b13e1ee

Browse files
committed
skip empty description
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 <[email protected]>
1 parent 9ed0542 commit b13e1ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sphinx/writers/manpage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def __init__(self, document: nodes.document, builder: Builder) -> None:
113113
def header(self) -> str:
114114
tmpl = (".TH \"%(title_upper)s\" \"%(manual_section)s\""
115115
" \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n"
116-
".SH NAME\n"
116+
".SH NAME\n")
117+
if self._docinfo['subtitle']:
117118
"%(title)s \\- %(subtitle)s\n")
118119
return tmpl % self._docinfo
119120

0 commit comments

Comments
 (0)