Commits

georg.brandl  committed a8addca

Add changelog entry and fix feature.^

  • Participants
  • Parent commits 14df265

Comments (0)

Files changed (2)

   - The directories in the `html_static_path` can now contain
     subdirectories.
 
+  - The module index now isn't collapsed if the number of submodules
+    is larger than the number of toplevel modules.
+
 * The image directive now supports specifying the extension as ``.*``,
   which makes the builder select the one that matches best.  Thanks to
   Sebastian Wiesner.

File sphinx/builder.py

             # apply heuristics when to collapse modindex at page load:
             # only collapse if number of toplevel modules is larger than
             # number of submodules
-            collapse = len(modules) - num_toplevels > num_toplevels
+            collapse = len(modules) - num_toplevels < num_toplevels
 
             modindexcontext = dict(
                 modindexentries = modindexentries,
                 platforms = platforms,
                 letters = letters,
-                collapse = collapse,
+                collapse_modindex = collapse,
             )
             self.info(' modindex', nonl=1)
             self.handle_page('modindex', modindexcontext, 'modindex.html')