mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Omit nodes without refuri attribute from toc.ncx.
This fixes bug report on sphinx-dev.
This commit is contained in:
parent
603f7e5ec8
commit
b2a237b8b4
@ -198,7 +198,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
||||
"""Collect section titles, their depth in the toc and the refuri."""
|
||||
# XXX: is there a better way than checking the attribute
|
||||
# toctree-l[1-8] on the parent node?
|
||||
if isinstance(doctree, nodes.reference):
|
||||
if isinstance(doctree, nodes.reference) and hasattr(doctree, 'refuri'):
|
||||
refuri = doctree['refuri']
|
||||
if refuri.startswith('http://') or refuri.startswith('https://') \
|
||||
or refuri.startswith('irc:') or refuri.startswith('mailto:'):
|
||||
|
Loading…
Reference in New Issue
Block a user