Skip to content
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

config: Add 'link_inline_targets' #10194

Closed
wants to merge 1 commit into from

Conversation

stephenfin
Copy link
Contributor

Feature or Bugfix

  • Feature
  • Bugfix

(it's a bit of both)

Purpose

In Sphinx 4.4.0 as 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. This is a breaking change for many users and should not have been included in a MINOR release.

This PR adds a new configuration option, link_inline_targets, to disable this behavior by default.

Closes #10177

Detail

  • Add a new link_inline_targets config option
  • Update docs to reflect this change

Relates

In 4.4.0, we started allowing users to reference an inline target via
the 'ref' role. This had the unfortunate side-effect of changing inline
targets from locally scoped to globally scoped, breaking many document
trees in the process. Add a new config option, 'link_inline_targets',
which will allow users to opt-in to this behavior if they wish to use
it. It is disabled by default.

Signed-off-by: Stephen Finucane <stephen@that.guru>
@stephenfin
Copy link
Contributor Author

#10178 is an alternative that removes this feature entirely rather than making it configurable.

@tk0miya tk0miya added this to the 5.0.0 milestone Mar 27, 2022
@tk0miya
Copy link
Member

tk0miya commented Mar 27, 2022

I determined to revert #9993 during 4.x and reconsider to merge it again on 5.0 release (including this option).

@tk0miya tk0miya changed the base branch from 4.x to 5.x May 7, 2022 17:02
@tk0miya tk0miya modified the milestones: 5.0.0, 5.x May 7, 2022
@AA-Turner AA-Turner modified the milestones: 5.x, 6.x Oct 4, 2022
@AA-Turner
Copy link
Member

Feature was reverted--@stephenfin if you would like to keep this PR please re-open it.

A

@AA-Turner AA-Turner closed this Oct 4, 2022
@AA-Turner AA-Turner removed this from the 6.x milestone Oct 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

References are now unique across doctree, not doc
3 participants