Fix #6331: man: invalid output when doctest follows rubric

This commit is contained in:
Takeshi KOMIYA 2019-05-06 21:27:43 +09:00
parent a9b3ec5322
commit dc1c5fee70
3 changed files with 9 additions and 1 deletions

View File

@ -94,6 +94,7 @@ Bugs fixed
* #6213: ifconfig: contents after headings are not shown
* commented term in glossary directive is wrongly recognized
* #6299: rst domain: rst:directive directive generates waste space
* #6331: man: invalid output when doctest follows rubric
Testing
--------

View File

@ -282,7 +282,7 @@ class ManualPageTranslator(SphinxTranslator, BaseTranslator):
def depart_rubric(self, node):
# type: (nodes.Element) -> None
pass
self.body.append('\n')
def visit_seealso(self, node):
# type: (nodes.Element) -> None

View File

@ -59,3 +59,10 @@ def test_default_man_pages():
expected = [('index', 'stasi', 'STASI™ Documentation 1.0',
["Wolfgang Schäuble & G'Beckstein"], 1)]
assert default_man_pages(config) == expected
@pytest.mark.sphinx('man', testroot='markup-rubric')
def test_rubric(app, status, warning):
app.build()
content = (app.outdir / 'python.1').text()
assert 'This is a rubric\n' in content