mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Omit empty URL targets in objects.inv
This commit is contained in:
parent
b215da8250
commit
d9080b3eef
@ -843,7 +843,9 @@ class StandaloneHTMLBuilder(Builder):
|
|||||||
if anchor.endswith(name):
|
if anchor.endswith(name):
|
||||||
# this can shorten the inventory by as much as 25%
|
# this can shorten the inventory by as much as 25%
|
||||||
anchor = anchor[:-len(name)] + '$'
|
anchor = anchor[:-len(name)] + '$'
|
||||||
uri = self.get_target_uri(docname) + '#' + anchor
|
uri = self.get_target_uri(docname)
|
||||||
|
if anchor:
|
||||||
|
uri += '#' + anchor
|
||||||
if dispname == name:
|
if dispname == name:
|
||||||
dispname = u'-'
|
dispname = u'-'
|
||||||
f.write(compressor.compress(
|
f.write(compressor.compress(
|
||||||
|
Loading…
Reference in New Issue
Block a user