Omit empty URL targets in objects.inv

This commit is contained in:
Andrey Golovizin 2015-09-28 19:56:54 +02:00
parent b215da8250
commit d9080b3eef

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(