mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Improve cpp intersphinx support
Now types called out in function declarations will be searched for in the intersphinx inventory as well
This commit is contained in:
@@ -4,3 +4,5 @@ test-ext-intersphinx-cppdomain
|
||||
.. cpp:namespace:: foo
|
||||
|
||||
:cpp:class:`Bar`
|
||||
|
||||
.. cpp:function:: std::uint8_t FooBarBaz()
|
||||
|
||||
@@ -232,6 +232,12 @@ def test_missing_reference_cppdomain(tempdir, app, status, warning):
|
||||
' href="https://docs.python.org/index.html#cpp_foo_bar"'
|
||||
' title="(in foo v2.0)"><code class="xref cpp cpp-class docutils literal">'
|
||||
'<span class="pre">Bar</span></code></a>' in html)
|
||||
assert ('<a class="reference external"'
|
||||
' href="https://docs.python.org/index.html#std"'
|
||||
' title="(in foo v2.0)">std</a>' in html)
|
||||
assert ('<a class="reference external"'
|
||||
' href="https://docs.python.org/index.html#std_uint8_t"'
|
||||
' title="(in foo v2.0)">uint8_t</a>' in html)
|
||||
|
||||
|
||||
def test_missing_reference_jsdomain(tempdir, app, status, warning):
|
||||
|
||||
@@ -34,6 +34,8 @@ module1 py:module 0 foo.html#module-module1 Long Module desc
|
||||
module2 py:module 0 foo.html#module-$ -
|
||||
module1.func py:function 1 sub/foo.html#$ -
|
||||
CFunc c:function 2 cfunc.html#CFunc -
|
||||
std cpp:type 1 index.html#std -
|
||||
std::uint8_t cpp:type 1 index.html#std_uint8_t -
|
||||
foo::Bar cpp:class 1 index.html#cpp_foo_bar -
|
||||
foo::Bar::baz cpp:function 1 index.html#cpp_foo_bar_baz -
|
||||
a term std:term -1 glossary.html#term-a-term -
|
||||
|
||||
Reference in New Issue
Block a user