- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
References are now unique across doctree, not doc #10177
Comments
We're seeing this the openstack/nova-specs project, since we use reference-style ( fwiw, we could in theory fix #9993 by only adding references if they're non-numeric, but that's slightly special behavior and in any case might result in a breaking change. |
The inline internal target syntax is one of the syntaxes to create a hyperlink target. So I think it's reasonable to behave as block level syntax ( On the other hand, it's also understandable that it's like a bug to change the behavior suddenly. So I'd like to add an option to control this behavior and disable it by default during v4.x. |
This would work, though I would argue that is should remain the default for a long time. This is a big change that breaks multiple previously working documentation trees. The fix is quite invasive also, requiring (in our case) modifying dozens of pages. I'll post a PR shortly to add the config option. |
I have pushed #10194 to do this. |
fwiw, I would personally much rather revert this entire thing (i.e. #10178) than make it configurable (i.e. #10194). We have clearly documented the need to specify a title for inline labels for a long time:
Even ignoring the history here, I don't think this feature is truly useful for larger documentation builds. Because you can't use a proper "format" for the label, the chances of a conflict are really, really high. This is likely the reason why we require users to provide explicit labels for headers, e.g. .. _my-reference-label:
Section to cross-reference
--------------------------
This is the text of the section. If this is behind a config option that is always |
Describe the bug
In Sphinx 4.4.0 (
likelyas a result of #9993), we have lost the ability to use reference-style links in docs except where the references are unique. For example, you can no longer use[1]
style links.How to Reproduce
$ cat index.rst
$ cat hello-a.rst
$ cat hello-b.rst
Expected behavior
Documentation should continue to build.
Your project
https://github.com/openstack/nova-specs
Screenshots
No response
OS
Linux
Python version
python3.10
Sphinx version
4.4.0
Sphinx extensions
No response
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: