mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #5391: A cross reference in heading is rendered as literal
This commit is contained in:
parent
ac9e9c0745
commit
615c0f8091
1
CHANGES
1
CHANGES
@ -22,6 +22,7 @@ Bugs fixed
|
|||||||
* #5508: ``linenothreshold`` option for ``highlight`` directive was ignored
|
* #5508: ``linenothreshold`` option for ``highlight`` directive was ignored
|
||||||
* texinfo: ``make install-info`` causes syntax error
|
* texinfo: ``make install-info`` causes syntax error
|
||||||
* texinfo: ``make install-info`` fails on macOS
|
* texinfo: ``make install-info`` fails on macOS
|
||||||
|
* #5391: A cross reference in heading is rendered as literal
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -340,11 +340,7 @@ class SphinxContentsFilter(ContentsFilter):
|
|||||||
Used with BuildEnvironment.add_toc_from() to discard cross-file links
|
Used with BuildEnvironment.add_toc_from() to discard cross-file links
|
||||||
within table-of-contents link nodes.
|
within table-of-contents link nodes.
|
||||||
"""
|
"""
|
||||||
def visit_pending_xref(self, node):
|
visit_pending_xref = ContentsFilter.ignore_node_but_process_children
|
||||||
# type: (addnodes.pending_xref) -> None
|
|
||||||
text = node.astext()
|
|
||||||
self.parent.append(nodes.literal(text, text))
|
|
||||||
raise nodes.SkipNode
|
|
||||||
|
|
||||||
def visit_image(self, node):
|
def visit_image(self, node):
|
||||||
# type: (nodes.image) -> None
|
# type: (nodes.image) -> None
|
||||||
|
Loading…
Reference in New Issue
Block a user