Merged in embray/sphinx/fix-tocdepth (pull request #100: Fixes a bug with :tocdepth: and inventory generation)

This commit is contained in:
Georg Brandl
2012-12-30 21:23:28 +01:00

View File

@@ -1229,8 +1229,9 @@ class BuildEnvironment:
anchorname=anchorname, *nodetext)
para = addnodes.compact_paragraph('', '', reference)
item = nodes.list_item('', para)
sub_item = build_toc(sectionnode, depth + 1)
if maxdepth == 0 or depth < maxdepth:
item += build_toc(sectionnode, depth+1)
item += sub_item
entries.append(item)
if entries:
return nodes.bullet_list('', *entries)