Fix top level nodes in main index incorrectly marked as expandable

Also dont add the "Sections" header to the ToC
This commit is contained in:
Kovid Goyal 2017-06-18 19:57:49 +05:30
parent 889fc123e1
commit 90b16ef410
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 3 deletions

View File

@ -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')

View File

@ -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 <calibre.epub>`_, `AZW3 (Kindle Fire) format <calibre.azw3>`_ and `PDF format <calibre.pdf>`_.
Sections
------------
.. rubric:: Sections
.. toctree::
:maxdepth: 1