From 90b16ef410ed951bfeb258455069efd6179c446a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 18 Jun 2017 19:57:49 +0530 Subject: [PATCH] Fix top level nodes in main index incorrectly marked as expandable Also dont add the "Sections" header to the ToC --- manual/sidebar_toc.py | 3 ++- manual/simple_index.rst | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manual/sidebar_toc.py b/manual/sidebar_toc.py index b039dfc337..828eb7cad2 100644 --- a/manual/sidebar_toc.py +++ b/manual/sidebar_toc.py @@ -57,7 +57,8 @@ def visit_checkbox(self, node): def modify_li(li): - if li.first_child_matching_class(nodes.bullet_list) is None: + sublist = li.first_child_matching_class(nodes.bullet_list) + if sublist is None or li[sublist].first_child_matching_class(nodes.list_item) is None: if not li.get('classes'): li['classes'] = [] li['classes'].append('leaf-node') diff --git a/manual/simple_index.rst b/manual/simple_index.rst index 1875bad1de..b01a61304d 100644 --- a/manual/simple_index.rst +++ b/manual/simple_index.rst @@ -19,8 +19,7 @@ To get started with more advanced usage, you should read about :doc:`gui`. For e **An e-book version of this user manual is available in** `EPUB format `_, `AZW3 (Kindle Fire) format `_ and `PDF format `_. -Sections ------------- +.. rubric:: Sections .. toctree:: :maxdepth: 1