Skip to content

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

@brotkrueml

Description

@brotkrueml

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".

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions