mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user