From 0fe9a0252b4866847ca628720b3833a558bfecc4 Mon Sep 17 00:00:00 2001 From: Roland Meister Date: Sun, 23 Dec 2012 00:03:17 +0100 Subject: [PATCH] Move adding 'toctree-l%d' classes to _mark_current; this fixes the test suite Also adjust comments and docstrings to reflect the current state. --- sphinx/environment.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) 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