Commits

Anonymous committed 1b252e5

Remove unneeded copy of children in _toctree_add_classes

Comments (0)

Files changed (1)

sphinx/environment.py

 
         def _toctree_add_classes(node, depth):
             """Add 'toctree-l%d' and 'current' classes to the toctree."""
-            for subnode in node.children[:]:
+            for subnode in node.children:
                 if isinstance(subnode, (addnodes.compact_paragraph,
                                         nodes.list_item)):
                     # for <p> and <li>, indicate the depth level and recurse