diff options
author | Harumi Kuno <harumi.kuno@hpe.com> | 2021-09-05 17:42:03 -0700 |
---|---|---|
committer | Harumi Kuno <harumi.kuno@hpe.com> | 2021-09-05 17:42:03 -0700 |
commit | d0e014b4bcf6b39bb7ba915a95204ae2371e6f0f (patch) | |
tree | a753a174eb8e9b5245e6f041d0a2c3b287c0ba7a /sphinx/writers/manpage.py | |
parent | 26be2d1a77fdf404b9061bc6f4a2e25d7e4cbab0 (diff) | |
download | sphinx-git-d0e014b4bcf6b39bb7ba915a95204ae2371e6f0f.tar.gz |
Omit NAME section if blank description
Also, update man page for configuration to document that
if a blank description is entered, the "NAME" section is an
empty string.
Signed-off-by: Harumi Kuno <harumi.kuno@hpe.com>
Diffstat (limited to 'sphinx/writers/manpage.py')
-rw-r--r-- | sphinx/writers/manpage.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/writers/manpage.py b/sphinx/writers/manpage.py index 29d93aa84..12fc31281 100644 --- a/sphinx/writers/manpage.py +++ b/sphinx/writers/manpage.py @@ -112,10 +112,10 @@ class ManualPageTranslator(SphinxTranslator, BaseTranslator): # overwritten -- added quotes around all .TH arguments def header(self) -> str: tmpl = (".TH \"%(title_upper)s\" \"%(manual_section)s\"" - " \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n" - ".SH NAME\n") + " \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n") if self._docinfo['subtitle']: - tmpl += "%(title)s \\- %(subtitle)s\n" + tmpl += (".SH NAME\n" + "%(title)s \\- %(subtitle)s\n") return tmpl % self._docinfo def visit_start_of_file(self, node: Element) -> None: |