diff --git a/Doc/tools/mkmodindex b/Doc/tools/mkmodindex index 257e30aa018..3bc4b956ea2 100755 --- a/Doc/tools/mkmodindex +++ b/Doc/tools/mkmodindex @@ -48,6 +48,23 @@ class IndexOptions(support.Options): print __doc__ % {"program": program} +class Node(buildindex.Node): + annotation = "" + + def __init__(self, link, str, seqno): + parts = str.split(None, 1) + if parts[0].endswith(""): + self.modname = parts[0][:-5] + else: + self.modname = parts[0] + if len(parts) == 2: + self.annotation = parts[1] + buildindex.Node.__init__(self, link, self.modname, seqno) + + def __str__(self): + return '%s %s' \ + % (self.modname, self.annotation) + _rx = re.compile( "