Fix #2579: Could not refer a label including both spaces and colons via sphinx.ext.intersphinx

This fixes only the case the label including both spaces and colons as
ad-hoc. There is still a bug if a label having spaces, colons and
numbers like "foo bar:baz 1234".

Note: To support the case, we have to improve the inventory format.
This commit is contained in:
Takeshi KOMIYA
2016-06-24 21:01:35 +09:00
parent fab5911004
commit 211fd352ae
3 changed files with 6 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ module2 py:module 0 foo.html#module-$ -
module1.func py:function 1 sub/foo.html#$ -
CFunc c:function 2 cfunc.html#CFunc -
a term std:term -1 glossary.html#term-a-term -
a term including:colon std:term -1 glossary.html#term-a-term-including-colon -
'''.encode('utf-8'))
@@ -78,6 +79,8 @@ def test_read_inventory_v2():
assert invdata1['c:function']['CFunc'][2] == '/util/cfunc.html#CFunc'
assert invdata1['std:term']['a term'][2] == \
'/util/glossary.html#term-a-term'
assert invdata1['std:term']['a term including:colon'][2] == \
'/util/glossary.html#term-a-term-including-colon'
@with_app()