Merge branch '2.0' into 3079_texinfo_install_figures

This commit is contained in:
Takeshi KOMIYA 2019-03-06 01:35:26 +09:00 committed by GitHub
commit 5415061293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 10 deletions

View File

@ -25,6 +25,7 @@ Bugs fixed
* texinfo: ``make install-info`` causes syntax error
* texinfo: ``make install-info`` fails on macOS
* #3079: texinfo: image files are not copied on ``make install-info``
* #5391: A cross reference in heading is rendered as literal
Testing
--------

View File

@ -311,10 +311,6 @@ class BuildEnvironment:
if docname in other.reread_always:
self.reread_always.add(docname)
for version, changes in other.versionchanges.items():
self.versionchanges.setdefault(version, []).extend(
change for change in changes if change[1] in docnames)
for domainname, domain in self.domains.items():
domain.merge_domaindata(docnames, other.domaindata[domainname])
app.emit('env-merge-info', self, docnames, other)

View File

@ -340,11 +340,7 @@ class SphinxContentsFilter(ContentsFilter):
Used with BuildEnvironment.add_toc_from() to discard cross-file links
within table-of-contents link nodes.
"""
def visit_pending_xref(self, node):
# type: (addnodes.pending_xref) -> None
text = node.astext()
self.parent.append(nodes.literal(text, text))
raise nodes.SkipNode
visit_pending_xref = ContentsFilter.ignore_node_but_process_children
def visit_image(self, node):
# type: (nodes.image) -> None

View File

@ -11,11 +11,13 @@
from docutils import nodes
from mock import Mock
from sphinx.roles import emph_literal_role
from sphinx.roles import EmphasizedLiteral
from sphinx.testing.util import assert_node
def test_samp():
emph_literal_role = EmphasizedLiteral()
# normal case
text = 'print 1+{variable}'
ret, msg = emph_literal_role('samp', text, text, 0, Mock())