Files
sphinx/doc/usage/extensions
Chris Sewell 565d4104d5 👌 Handle external references pointing to object types (#12133)
This commit fixes the issue of `objects.inv` denoting object names, whilst the `external` role only allows for role names. 

As an example, take the `objects.inv` for the sphinx documentation, which contains:

```
py:function
    compile                  : usage/domains/python.html#compile
```

A user might understandably expect that they could reference this using `` :external:py:function:`compile` ``, but actually this would previously error with:

```
WARNING: role for external cross-reference not found: py:function
```

this is because, `function` is the object type, yet `external` expects the related role name `func`.

It should not be necessary for the user to know about this distinction,
so in this commit, we add logic, to first look if the name relates to a role name (as previous, to not be back-breaking) but, if not, then also look if the name relates to an object that has a known role and, if so, use that.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-03-19 13:42:50 +01:00
..
2022-10-17 22:39:09 +01:00
2022-10-17 22:39:09 +01:00
2019-02-11 13:25:24 +09:00
2019-05-30 01:07:05 +09:00
2022-05-02 13:56:51 +02:00
2024-01-14 04:18:57 +00:00
2019-05-26 10:53:53 +09:00