summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docutils/HISTORY.txt1
-rw-r--r--docutils/docutils/writers/manpage.py2
-rw-r--r--docutils/test/functional/expected/standalone_rst_manpage.man2
-rw-r--r--docutils/test/test_writers/test_manpage.py14
-rw-r--r--sandbox/manpage-writer/expected/characters.ascii4
-rw-r--r--sandbox/manpage-writer/expected/characters.latin14
-rw-r--r--sandbox/manpage-writer/expected/characters.man2
-rw-r--r--sandbox/manpage-writer/expected/characters.utf84
-rw-r--r--sandbox/manpage-writer/expected/compact_lists.man2
-rw-r--r--sandbox/manpage-writer/expected/docinfo-deu-l_de.man2
-rw-r--r--sandbox/manpage-writer/expected/docinfo-deu-l_en.man2
-rw-r--r--sandbox/manpage-writer/expected/docinfo-deu.man2
-rw-r--r--sandbox/manpage-writer/expected/docinfo-eng-l_de.man2
-rw-r--r--sandbox/manpage-writer/expected/docinfo-eng-l_en.man2
-rw-r--r--sandbox/manpage-writer/expected/docinfo-eng.man2
-rw-r--r--sandbox/manpage-writer/expected/dotted.man2
-rw-r--r--sandbox/manpage-writer/expected/indent.man2
-rw-r--r--sandbox/manpage-writer/expected/man-de.1.man2
-rw-r--r--sandbox/manpage-writer/expected/optionslisttest.man2
-rw-r--r--sandbox/manpage-writer/expected/optionstoo.man2
-rw-r--r--sandbox/manpage-writer/expected/test.man2
21 files changed, 30 insertions, 29 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+
diff --git a/sandbox/manpage-writer/expected/characters.ascii b/sandbox/manpage-writer/expected/characters.ascii
index cc4f0ccb8..848b7755f 100644
--- a/sandbox/manpage-writer/expected/characters.ascii
+++ b/sandbox/manpage-writer/expected/characters.ascii
@@ -1,4 +1,4 @@
-SPECIAL(CHARACTERS) SPECIAL(CHARACTERS)
+SPECIAL CHARACTERS() SPECIAL CHARACTERS()
@@ -41,4 +41,4 @@ DDEESSCCRRIIPPTTIIOONN
- SPECIAL(CHARACTERS)
+ SPECIAL CHARACTERS()
diff --git a/sandbox/manpage-writer/expected/characters.latin1 b/sandbox/manpage-writer/expected/characters.latin1
index d4e049162..c1abcc7ba 100644
--- a/sandbox/manpage-writer/expected/characters.latin1
+++ b/sandbox/manpage-writer/expected/characters.latin1
@@ -1,4 +1,4 @@
-SPECIAL(CHARACTERS) SPECIAL(CHARACTERS)
+SPECIAL CHARACTERS() SPECIAL CHARACTERS()
@@ -41,4 +41,4 @@ DDEESSCCRRIIPPTTIIOONN
- SPECIAL(CHARACTERS)
+ SPECIAL CHARACTERS()
diff --git a/sandbox/manpage-writer/expected/characters.man b/sandbox/manpage-writer/expected/characters.man
index aa4572d40..fc307d681 100644
--- a/sandbox/manpage-writer/expected/characters.man
+++ b/sandbox/manpage-writer/expected/characters.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH SPECIAL CHARACTERS "" "" ""
+.TH "SPECIAL CHARACTERS" "" "" ""
.SH NAME
special characters \- test special characters
.
diff --git a/sandbox/manpage-writer/expected/characters.utf8 b/sandbox/manpage-writer/expected/characters.utf8
index 7fb5e6194..662a20730 100644
--- a/sandbox/manpage-writer/expected/characters.utf8
+++ b/sandbox/manpage-writer/expected/characters.utf8
@@ -1,4 +1,4 @@
-SPECIAL(CHARACTERS) SPECIAL(CHARACTERS)
+SPECIAL CHARACTERS() SPECIAL CHARACTERS()
@@ -41,4 +41,4 @@ DDEESSCCRRIIPPTTIIOONN
- SPECIAL(CHARACTERS)
+ SPECIAL CHARACTERS()
diff --git a/sandbox/manpage-writer/expected/compact_lists.man b/sandbox/manpage-writer/expected/compact_lists.man
index 1f19265fc..6d073ed1d 100644
--- a/sandbox/manpage-writer/expected/compact_lists.man
+++ b/sandbox/manpage-writer/expected/compact_lists.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "" "" ""
+.TH "" "" "" ""
.SH NAME
\-
.
diff --git a/sandbox/manpage-writer/expected/docinfo-deu-l_de.man b/sandbox/manpage-writer/expected/docinfo-deu-l_de.man
index 598bdf24e..62dc25d49 100644
--- a/sandbox/manpage-writer/expected/docinfo-deu-l_de.man
+++ b/sandbox/manpage-writer/expected/docinfo-deu-l_de.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH DEUTSCHES_MANPAGE_BEISPIEL 1 "2009-08-24" "0.5" "Beispielmanpages"
+.TH "DEUTSCHES_MANPAGE_BEISPIEL" 1 "2009-08-24" "0.5" "Beispielmanpages"
.SH NAME
deutsches_manpage_beispiel \- manpage beschreibung
.
diff --git a/sandbox/manpage-writer/expected/docinfo-deu-l_en.man b/sandbox/manpage-writer/expected/docinfo-deu-l_en.man
index a923ba251..caf3a10f0 100644
--- a/sandbox/manpage-writer/expected/docinfo-deu-l_en.man
+++ b/sandbox/manpage-writer/expected/docinfo-deu-l_en.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH DEUTSCHES_MANPAGE_BEISPIEL 1 "" "0.5" "Beispielmanpages"
+.TH "DEUTSCHES_MANPAGE_BEISPIEL" 1 "" "0.5" "Beispielmanpages"
.SH NAME
deutsches_manpage_beispiel \- manpage beschreibung
.
diff --git a/sandbox/manpage-writer/expected/docinfo-deu.man b/sandbox/manpage-writer/expected/docinfo-deu.man
index a923ba251..caf3a10f0 100644
--- a/sandbox/manpage-writer/expected/docinfo-deu.man
+++ b/sandbox/manpage-writer/expected/docinfo-deu.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH DEUTSCHES_MANPAGE_BEISPIEL 1 "" "0.5" "Beispielmanpages"
+.TH "DEUTSCHES_MANPAGE_BEISPIEL" 1 "" "0.5" "Beispielmanpages"
.SH NAME
deutsches_manpage_beispiel \- manpage beschreibung
.
diff --git a/sandbox/manpage-writer/expected/docinfo-eng-l_de.man b/sandbox/manpage-writer/expected/docinfo-eng-l_de.man
index 303008af4..c25f88da0 100644
--- a/sandbox/manpage-writer/expected/docinfo-eng-l_de.man
+++ b/sandbox/manpage-writer/expected/docinfo-eng-l_de.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH ENGLISH_MANPAGE_SAMPLE 1 "2009-08-24" "0.5" "Example manpages"
+.TH "ENGLISH_MANPAGE_SAMPLE" 1 "2009-08-24" "0.5" "Example manpages"
.SH NAME
english_manpage_sample \- manpage description
.
diff --git a/sandbox/manpage-writer/expected/docinfo-eng-l_en.man b/sandbox/manpage-writer/expected/docinfo-eng-l_en.man
index 303008af4..c25f88da0 100644
--- a/sandbox/manpage-writer/expected/docinfo-eng-l_en.man
+++ b/sandbox/manpage-writer/expected/docinfo-eng-l_en.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH ENGLISH_MANPAGE_SAMPLE 1 "2009-08-24" "0.5" "Example manpages"
+.TH "ENGLISH_MANPAGE_SAMPLE" 1 "2009-08-24" "0.5" "Example manpages"
.SH NAME
english_manpage_sample \- manpage description
.
diff --git a/sandbox/manpage-writer/expected/docinfo-eng.man b/sandbox/manpage-writer/expected/docinfo-eng.man
index 303008af4..c25f88da0 100644
--- a/sandbox/manpage-writer/expected/docinfo-eng.man
+++ b/sandbox/manpage-writer/expected/docinfo-eng.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH ENGLISH_MANPAGE_SAMPLE 1 "2009-08-24" "0.5" "Example manpages"
+.TH "ENGLISH_MANPAGE_SAMPLE" 1 "2009-08-24" "0.5" "Example manpages"
.SH NAME
english_manpage_sample \- manpage description
.
diff --git a/sandbox/manpage-writer/expected/dotted.man b/sandbox/manpage-writer/expected/dotted.man
index 8bac3bf4f..f585eb1de 100644
--- a/sandbox/manpage-writer/expected/dotted.man
+++ b/sandbox/manpage-writer/expected/dotted.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH WELCOME TO TEST'S DOCUMENTATION! "" "" ""
+.TH "WELCOME TO TEST'S DOCUMENTATION!" "" "" ""
.SH NAME
Welcome to test's documentation! \-
.
diff --git a/sandbox/manpage-writer/expected/indent.man b/sandbox/manpage-writer/expected/indent.man
index 755d160a8..0c4de8565 100644
--- a/sandbox/manpage-writer/expected/indent.man
+++ b/sandbox/manpage-writer/expected/indent.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "" "" ""
+.TH "" "" "" ""
.SH NAME
\-
.
diff --git a/sandbox/manpage-writer/expected/man-de.1.man b/sandbox/manpage-writer/expected/man-de.1.man
index 00f44569a..1ae30c0e5 100644
--- a/sandbox/manpage-writer/expected/man-de.1.man
+++ b/sandbox/manpage-writer/expected/man-de.1.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH MAN 1 "2008-01-28" "2.5.1" "Manual Hilfsprogramme"
+.TH "MAN" 1 "2008-01-28" "2.5.1" "Manual Hilfsprogramme"
.SH NAME
man \- Programm zum Einsehen der Online-Manuale
.
diff --git a/sandbox/manpage-writer/expected/optionslisttest.man b/sandbox/manpage-writer/expected/optionslisttest.man
index aa5577568..ce0b289ce 100644
--- a/sandbox/manpage-writer/expected/optionslisttest.man
+++ b/sandbox/manpage-writer/expected/optionslisttest.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH OPTIONLISTTEST 1 "2008-04-29" "" ""
+.TH "OPTIONLISTTEST" 1 "2008-04-29" "" ""
.SH NAME
OptionlistTest \- Test for correct intention/detention of option lists
.
diff --git a/sandbox/manpage-writer/expected/optionstoo.man b/sandbox/manpage-writer/expected/optionstoo.man
index 0d0d2dcbb..164e7f3d1 100644
--- a/sandbox/manpage-writer/expected/optionstoo.man
+++ b/sandbox/manpage-writer/expected/optionstoo.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "" "" ""
+.TH "" "" "" ""
.SH NAME
\-
.
diff --git a/sandbox/manpage-writer/expected/test.man b/sandbox/manpage-writer/expected/test.man
index fd526b5fe..f125ed17d 100644
--- a/sandbox/manpage-writer/expected/test.man
+++ b/sandbox/manpage-writer/expected/test.man
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH RST2MAN 1 "2009-06-22" "0.0.1" "text processing"
+.TH "RST2MAN" 1 "2009-06-22" "0.0.1" "text processing"
.SH NAME
rst2man \- generate unix manpages from reStructured text
.