mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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 sphinx-doc#9430 Signed-off-by: Harumi Kuno <harumi.kuno@hpe.com>
This commit is contained in:
@@ -113,8 +113,9 @@ class ManualPageTranslator(SphinxTranslator, BaseTranslator):
|
||||
def header(self) -> str:
|
||||
tmpl = (".TH \"%(title_upper)s\" \"%(manual_section)s\""
|
||||
" \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n"
|
||||
".SH NAME\n"
|
||||
"%(title)s \\- %(subtitle)s\n")
|
||||
".SH NAME\n")
|
||||
if self._docinfo['subtitle']:
|
||||
tmpl += "%(title)s \\- %(subtitle)s\n"
|
||||
return tmpl % self._docinfo
|
||||
|
||||
def visit_start_of_file(self, node: Element) -> None:
|
||||
|
||||
Reference in New Issue
Block a user