diff --git a/sphinx/environment.py b/sphinx/environment.py index d55aa7a2e..5eb8afcaf 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -1334,9 +1334,7 @@ class BuildEnvironment: for subnode in node.children[:]: if isinstance(subnode, (addnodes.compact_paragraph, nodes.list_item)): - # for

and

  • , just indicate the depth level and - # recurse to children - subnode['classes'].append('toctree-l%d' % (depth-1)) + # for

    and

  • , just recurse _walk_depth(subnode, depth, maxdepth) elif isinstance(subnode, nodes.bullet_list): # for