|
From: <gr...@us...> - 2024-04-03 17:29:39
|
Revision: 9610
http://sourceforge.net/p/docutils/code/9610
Author: grubert
Date: 2024-04-03 17:29:36 +0000 (Wed, 03 Apr 2024)
Log Message:
-----------
Put manual section in .TH in quotes.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/manpage.py
trunk/docutils/test/functional/expected/standalone_rst_manpage.man
trunk/docutils/test/test_writers/test_manpage.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2024-03-30 09:55:42 UTC (rev 9609)
+++ trunk/docutils/HISTORY.txt 2024-04-03 17:29:36 UTC (rev 9610)
@@ -177,6 +177,7 @@
* docutils/writers/manpage.py
+ - Put manual section in .TH in quotes.
- Skip footer to avoid the link to document source in the manpage.
- Add multiple definition list term support, see feature #60.
- Render reference, refid and refuri.
Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py 2024-03-30 09:55:42 UTC (rev 9609)
+++ trunk/docutils/docutils/writers/manpage.py 2024-04-03 17:29:36 UTC (rev 9610)
@@ -379,7 +379,7 @@
self._list_char.pop()
def header(self):
- th = (".TH \"%(title_upper)s\" %(manual_section)s"
+ 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
Modified: trunk/docutils/test/functional/expected/standalone_rst_manpage.man
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_manpage.man 2024-03-30 09:55:42 UTC (rev 9609)
+++ trunk/docutils/test/functional/expected/standalone_rst_manpage.man 2024-04-03 17:29:36 UTC (rev 9610)
@@ -27,7 +27,7 @@
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
-.TH "RST2MAN" 1 "2006-10-22" "0.1" "text processing"
+.TH "RST2MAN" "1" "2006-10-22" "0.1" "text processing"
.SH NAME
rst2man \- generate unix manpages from reStructured text
.\" TODO: authors and author with name <email>
Modified: trunk/docutils/test/test_writers/test_manpage.py
===================================================================
--- trunk/docutils/test/test_writers/test_manpage.py 2024-03-30 09:55:42 UTC (rev 9609)
+++ trunk/docutils/test/test_writers/test_manpage.py 2024-04-03 17:29:36 UTC (rev 9610)
@@ -73,7 +73,7 @@
["",
r""".\" Man page generated from reStructuredText.
.
-""" + indend_macros + """.TH "" "" ""
+""" + indend_macros + """.TH "" "" "" ""
.SH NAME
\\- \n\
.\\" Generated by docutils manpage writer.
@@ -88,7 +88,7 @@
""",
r""".\" Man page generated from reStructuredText.
.
-""" + indend_macros + """.TH "HELLO, WORLD." "" ""
+""" + indend_macros + """.TH "HELLO, WORLD." "" "" ""
.SH NAME
Hello, world. \\- \n\
.sp
@@ -165,7 +165,7 @@
""",
r""".\" Man page generated from reStructuredText.
.
-""" + indend_macros + r""".TH "SIMPLE" 1 "2009-08-05" "0.1" "text processing"
+""" + indend_macros + r""".TH "SIMPLE" "1" "2009-08-05" "0.1" "text processing"
.SH NAME
simple \- The way to go
.SH SYNOPSIS
@@ -246,7 +246,7 @@
\'\\" t
.\\" Man page generated from reStructuredText.
.
-''' + indend_macros + '''.TH "" "" ""
+''' + indend_macros + '''.TH "" "" "" ""
.SH NAME
\\- \n\
.INDENT 0.0
@@ -301,7 +301,7 @@
"""\
.\\" Man page generated from reStructuredText.
.
-""" + indend_macros + """.TH "" "" ""
+""" + indend_macros + """.TH "" "" "" ""
.SH NAME
\\- \n\
optin group with dot as group item
@@ -358,7 +358,7 @@
'''\
.\\" Man page generated from reStructuredText.
.
-''' + indend_macros + '''.TH "DEFINITION LIST TEST" "" ""
+''' + indend_macros + '''.TH "DEFINITION LIST TEST" "" "" ""
.SH NAME
Definition List Test \\- \n\
''' + '''.SS Abstract
@@ -387,7 +387,7 @@
""",
r""".\" Man page generated from reStructuredText.
.
-""" + indend_macros + """.TH "" "" ""
+""" + indend_macros + """.TH "" "" "" ""
.SH NAME
\\- \n\
.INDENT 0.0
@@ -416,7 +416,7 @@
""",
r""".\" Man page generated from reStructuredText.
.
-""" + indend_macros + """.TH "" "" ""
+""" + indend_macros + """.TH "" "" "" ""
.SH NAME
\\- \n\
.IP [docutils] 5
@@ -435,7 +435,7 @@
""",
r""".\" Man page generated from reStructuredText.
.
-""" + indend_macros + """.TH "" "" ""
+""" + indend_macros + """.TH "" "" "" ""
.SH NAME
\\- \n\
some rubric
@@ -458,7 +458,7 @@
""",
r""".\" Man page generated from reStructuredText.
.
-""" + indend_macros + """.TH "" "" ""
+""" + indend_macros + """.TH "" "" "" ""
.SH NAME
\\- \n\
.INDENT 0.0
@@ -491,7 +491,7 @@
""",
r""".\" Man page generated from reStructuredText.
.
-""" + indend_macros + r""".TH "PAGE TITLE" 3 "3/Nov/2022" "0.0" "the books"
+""" + indend_macros + r""".TH "PAGE TITLE" "3" "3/Nov/2022" "0.0" "the books"
.SH NAME
page title \- in short
.sp
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|