Merge pull request #2055 from erosennin/intersphinx-omit-empty-target

Fix: omit empty URL targets in objects.inv
This commit is contained in:
Georg Brandl
2015-09-28 22:38:15 +02:00
+3 -1
View File
@@ -843,7 +843,9 @@ class StandaloneHTMLBuilder(Builder):
if anchor.endswith(name):
# this can shorten the inventory by as much as 25%
anchor = anchor[:-len(name)] + '$'
uri = self.get_target_uri(docname) + '#' + anchor
uri = self.get_target_uri(docname)
if anchor:
uri += '#' + anchor
if dispname == name:
dispname = u'-'
f.write(compressor.compress(