Commits

ral...@hp  committed d64dd95

fix a few more bugs in the index generation

  • Participants
  • Parent commits 521a48b

Comments (0)

Files changed (1)

File sphinx/builders/pdf.py

                 pass
 
 def genindex_nodes(genindexentries):
-    pprint(genindexentries)
     output=['DUMMY','=====','','','INDEX','=====','']
 
     for key, entries in genindexentries:
             if links:
                 output.append('`%s <%s>`_'%(entryname,links[0]))
                 for i,link in enumerate(links[1:]):
-                    print '<a href="%s">[%s]</a>'%(link,i)
+                    output[-1]+=(' `[%s] <%s>`_ '%(i+1,link))
+                output.append('')
             else:
                 output.append(entryname)
             if subitems:
                 for subentryname, subentrylinks in subitems:
                     output.append('    `%s <%s>`_'%(subentryname,subentrylinks[0]))
                     for i,link in enumerate(subentrylinks[1:]):
-                        output.append(' `[%s] <%s>`_'%(i,link))
+                        output[-1]+=(' `[%s] <%s>`_ '%(i+1,link))
                     output.append('')
-            output.append('')
 
     doctree = docutils.core.publish_doctree('\n'.join(output))
     return doctree[1]