diff options
Diffstat (limited to 'docutils')
| -rw-r--r-- | docutils/HISTORY.txt | 1 | ||||
| -rw-r--r-- | docutils/docutils/writers/manpage.py | 2 | ||||
| -rw-r--r-- | docutils/test/functional/expected/standalone_rst_manpage.man | 2 | ||||
| -rw-r--r-- | docutils/test/test_writers/test_manpage.py | 14 |
4 files changed, 10 insertions, 9 deletions
diff --git a/docutils/HISTORY.txt b/docutils/HISTORY.txt index b2aa12ca1..a6ef0818f 100644 --- a/docutils/HISTORY.txt +++ b/docutils/HISTORY.txt @@ -63,6 +63,7 @@ Changes Since 0.16 * docutils/writers/manpage.py + - [ Fix #126 ] manpage title with spaces. - [ Fix #380 ] commandline option problem in sphinx. .. _pip: https://pypi.org/project/pip/ diff --git a/docutils/docutils/writers/manpage.py b/docutils/docutils/writers/manpage.py index 035a479ca..768f436fd 100644 --- a/docutils/docutils/writers/manpage.py +++ b/docutils/docutils/writers/manpage.py @@ -375,7 +375,7 @@ class Translator(nodes.NodeVisitor): self._list_char.pop() def header(self): - tmpl = (".TH %(title_upper)s %(manual_section)s" + tmpl = (".TH \"%(title_upper)s\" %(manual_section)s" " \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n" ".SH NAME\n" "%(title)s \\- %(subtitle)s\n") diff --git a/docutils/test/functional/expected/standalone_rst_manpage.man b/docutils/test/functional/expected/standalone_rst_manpage.man index 4bf8d28c3..7a51314d8 100644 --- a/docutils/test/functional/expected/standalone_rst_manpage.man +++ b/docutils/test/functional/expected/standalone_rst_manpage.man @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.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 . diff --git a/docutils/test/test_writers/test_manpage.py b/docutils/test/test_writers/test_manpage.py index 53b42cc6f..6567b7a1d 100644 --- a/docutils/test/test_writers/test_manpage.py +++ b/docutils/test/test_writers/test_manpage.py @@ -55,7 +55,7 @@ totest['blank'] = [ ["", r""".\" Man page generated from reStructuredText. . -.TH "" "" "" +.TH "" "" "" "" .SH NAME \- """+indend_macros+ @@ -71,7 +71,7 @@ r""".\" Generated by docutils manpage writer. """, r""".\" Man page generated from reStructuredText. . -.TH HELLO, WORLD. "" "" "" +.TH "HELLO, WORLD." "" "" "" .SH NAME Hello, world. \- """+indend_macros+ @@ -147,7 +147,7 @@ and . in a line and at line start """, r""".\" Man page generated from reStructuredText. . -.TH SIMPLE 1 "2009-08-05" "0.1" "text processing" +.TH "SIMPLE" 1 "2009-08-05" "0.1" "text processing" .SH NAME simple \- The way to go """+indend_macros+ @@ -228,7 +228,7 @@ totest['table'] = [ '''\ .\\" Man page generated from reStructuredText. . -.TH "" "" "" +.TH "" "" "" "" .SH NAME \\- \n\ '''+indend_macros+ @@ -286,7 +286,7 @@ $ """\ .\\" Man page generated from reStructuredText. . -.TH "" "" "" +.TH "" "" "" "" .SH NAME \\- \n\ """+indend_macros+ @@ -343,7 +343,7 @@ Section '''\ .\\" Man page generated from reStructuredText. . -.TH DEFINITION LIST TEST "" "" "" +.TH "DEFINITION LIST TEST" "" "" "" .SH NAME Definition List Test \\- \n\ '''+indend_macros+ @@ -372,7 +372,7 @@ totest['cmdlineoptions'] = [ """, r""".\" Man page generated from reStructuredText. . -.TH "" "" "" +.TH "" "" "" "" .SH NAME \- """+indend_macros+ |
