Closes #864: Fix crash with some settings of :confval:modindex_common_prefix.

This commit is contained in:
Georg Brandl 2012-01-29 10:43:31 +01:00
parent 5b63fbfd44
commit a6512317bf
2 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,8 @@ Release 1.1.3 (in development)
* #860: Do not crash when encountering invalid doctest examples, just
emit a warning.
* #864: Fix crash with some settings of :confval:`modindex_common_prefix`.
Release 1.1.2 (Nov 1, 2011) -- 1.1.1 is a silly version number anyway!
======================================================================

View File

@ -525,6 +525,7 @@ class PythonModuleIndex(Index):
# it's a submodule
if prev_modname == package:
# first submodule - make parent a group head
if entries:
entries[-1][1] = 1
elif not prev_modname.startswith(package):
# submodule without parent in list, add dummy entry