mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #6331: man: invalid output when doctest follows rubric
This commit is contained in:
parent
a9b3ec5322
commit
dc1c5fee70
1
CHANGES
1
CHANGES
@ -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
|
||||
--------
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user