Skip to content

[Bug]: Reference is linked to header instead to defined anchor #970

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
brotkrueml opened this issue Apr 4, 2024 · 0 comments · Fixed by #996
Closed

[Bug]: Reference is linked to header instead to defined anchor #970

brotkrueml opened this issue Apr 4, 2024 · 0 comments · Fixed by #996
Assignees
Labels
bug Something isn't working triage

Comments

@brotkrueml
Copy link
Contributor

Summary

If a header with the same name as an anchor on a separate page is available, and this anchor is referenced, the header of that page is linked instead the anchor on the separate page.

See, for example, here:
https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ExtensionArchitecture/HowTo/Configuration.html#flexforms
There is a header "FlexForms", also a reference to FlexForms (in the admonition "See also) which references "flexforms".
On a separate page: https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ApiOverview/FlexForms/Index.html
There is the anchor available.

But the header of the Configuration page is linked to, instead the anchor.

Code snippet that reproduces the problem

One page:

FlexForms
=========

:ref:`FlexForms <flexforms>`

Another page:

.. _flexforms:

=========
FlexForms
=========

Expected output

The ref "flexforms" is linked to the page with the anchor "flexforms".

@brotkrueml brotkrueml added bug Something isn't working triage labels Apr 4, 2024
@linawolf linawolf self-assigned this Apr 20, 2024
linawolf added a commit that referenced this issue Apr 20, 2024
linawolf added a commit that referenced this issue Apr 20, 2024
phpdoc-bot pushed a commit to phpDocumentor/guides-core that referenced this issue Apr 20, 2024
phpdoc-bot pushed a commit that referenced this issue Apr 20, 2024
References #970

(cherry picked from commit 1af4aad)
phpdoc-bot pushed a commit to phpDocumentor/guides-core that referenced this issue Apr 20, 2024
References phpDocumentor/guides#970

(cherry picked from commit 1af4aad5403fe743ea46d2996bd85e1ba4cca19f)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants