mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Ensure that the entire doctree is traversed and all TOCs are processed regardless of tocdepth; now tocdepth only controls the depth of the node tree for the document's TOC.
This commit is contained in:
parent
c69b7b4253
commit
19d51e4270
@ -1209,8 +1209,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)
|
||||
|
Loading…
Reference in New Issue
Block a user