|
From: <gr...@us...> - 2022-11-02 17:08:11
|
Revision: 9199
http://sourceforge.net/p/docutils/code/9199
Author: grubert
Date: 2022-11-02 17:08:08 +0000 (Wed, 02 Nov 2022)
Log Message:
-----------
manpage writer: Do not output empty "manual" in ``.TH``
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/manpage.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2022-11-02 16:04:50 UTC (rev 9198)
+++ trunk/docutils/HISTORY.txt 2022-11-02 17:08:08 UTC (rev 9199)
@@ -14,6 +14,10 @@
Changes Since 0.19
==================
+* docutils/writers/manpage.py
+
+ - Do not output empty "manual" in ``.TH``
+
* add python 3.11 to setup.py and tox.ini. Patch by hugovk.
* docutils/languages/
Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py 2022-11-02 16:04:50 UTC (rev 9198)
+++ trunk/docutils/docutils/writers/manpage.py 2022-11-02 17:08:08 UTC (rev 9199)
@@ -375,11 +375,14 @@
self._list_char.pop()
def header(self):
- tmpl = (".TH \"%(title_upper)s\" %(manual_section)s"
- " \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n"
- ".SH NAME\n"
+ th = (".TH \"%(title_upper)s\" %(manual_section)s"
+ " \"%(date)s\" \"%(version)s\"") % self._docinfo
+ if self._docinfo["manual_group"]:
+ th += " \"%(manual_group)s\"" % self._docinfo
+ th += "\n"
+ sh_tmpl = (".SH NAME\n"
"%(title)s \\- %(subtitle)s\n")
- return tmpl % self._docinfo
+ return th + sh_tmpl % self._docinfo
def append_header(self):
"""append header with .TH and .SH NAME"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|