Roland Meister  committed b84771b

Omit nodes without refuri attribute from toc.ncx.
This fixes bug report on sphinx-dev.

  • Participants
  • Parent commits 7db6b52

Comments (0)

Files changed (1)

File sphinx/builders/

         """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:'):