Commits

Anonymous committed 1e36da8

Fixed KeyError in StandardDomain.get_objects

Remove domain prefix from type when inserting generic targets into the
inventory, as everything else (especially StandardDomain.get_objects)
expects it this way.

  • Participants
  • Parent commits 13de2f4

Comments (0)

Files changed (1)

File sphinx/domains/std.py

             inode = addnodes.index(entries=[(indextype, indexentry,
                                              targetname, targetname)])
             ret.insert(0, inode)
-        env.domaindata['std']['objects'][self.name, fullname] = \
+        name = self.name
+        if ':' in self.name:
+            _, name = self.name.split(':', 1)
+        env.domaindata['std']['objects'][name, fullname] = \
             env.docname, targetname
         return ret