Merge pull request #6160 from tk0miya/adjust

pretty changes for 2.0
This commit is contained in:
Takeshi KOMIYA 2019-03-10 17:34:43 +09:00 committed by GitHub
commit db23555f7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -473,14 +473,14 @@ class ManualPageTranslator(SphinxTranslator, BaseTranslator):
if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):
self.body.append('.sp\n')
else:
BaseTranslator.visit_caption(self, node)
super().visit_caption(node)
def depart_caption(self, node):
# type: (nodes.Element) -> None
if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):
self.body.append('\n')
else:
BaseTranslator.depart_caption(self, node)
super().depart_caption(node)
# overwritten: handle section titles better than in 0.6 release
def visit_title(self, node):

View File

@ -1414,7 +1414,7 @@ def test_includegraphics_oversized(app, status, warning):
@pytest.mark.sphinx('latex', testroot='index_on_title')
def test_index_on_title(app, status, warning):
app.builder.build_all()
result = (app.outdir / 'Python.tex').text(encoding='utf8')
result = (app.outdir / 'python.tex').text(encoding='utf8')
assert ('\\chapter{Test for index in top level title}\n'
'\\label{\\detokenize{contents:test-for-index-in-top-level-title}}'
'\\index{index@\\spxentry{index}}\n'