Fix the case where a toctree doesn't contain anything.

This commit is contained in:
Georg Brandl 2008-04-06 13:32:15 +00:00
parent 30b17cb1e5
commit 9fb011bd2a

View File

@ -722,7 +722,7 @@ class BuildEnvironment:
entries.append(toc)
if entries:
return addnodes.compact_paragraph('', '', *entries)
return None
return []
def _walk_depth(node, depth, maxdepth, titleoverrides):
"""Utility: Cut a TOC at a specified depth."""