Commits

Georg Brandl committed ef909df

Really fix IndexError from #424.

  • Participants
  • Parent commits df79322

Comments (0)

Files changed (1)

File sphinx/ext/viewcode.py

         # now that we have code lines (starting at index 1), insert anchors for
         # the collected tags (HACK: this only works if the tag boundaries are
         # properly nested!)
-        maxindex = len(lines)
+        maxindex = len(lines) - 1
         for name, docname in used.iteritems():
             type, start, end = tags[name]
             backlink = urito(pagename, docname) + '#' + modname + '.' + name