mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2602: URL redirection breaks the hyperlinks generated by sphinx.ext.intersphinx
This commit is contained in:
parent
f147df3fa0
commit
851929c912
1
CHANGES
1
CHANGES
@ -8,6 +8,7 @@ Bugs fixed
|
||||
* ``width`` option of figure directive does not work if ``align`` option specified at same time (ref: #2595)
|
||||
* #2590: The ``inputenc`` package breaks compiling under lualatex and xelatex
|
||||
* #2540: date on latex front page use different font
|
||||
* #2602: URL redirection breaks the hyperlinks generated by `sphinx.ext.intersphinx`
|
||||
|
||||
|
||||
Release 1.4.2 (released May 29, 2016)
|
||||
|
@ -237,6 +237,12 @@ def fetch_inventory(app, uri, inv):
|
||||
'%s: %s' % (inv, err.__class__, err))
|
||||
return
|
||||
try:
|
||||
newuri = f.geturl()
|
||||
if newuri.endswith("/" + INVENTORY_FILENAME):
|
||||
newuri = newuri[:-len(INVENTORY_FILENAME) - 1]
|
||||
if uri != newuri:
|
||||
app.info('intersphinx inventory has moved: %s -> %s' % (uri, newuri))
|
||||
uri = newuri
|
||||
line = f.readline().rstrip().decode('utf-8')
|
||||
try:
|
||||
if line == '# Sphinx inventory version 1':
|
||||
|
Loading…
Reference in New Issue
Block a user