Skip to content

[Bug]: Section indexes should only render headers below the current place #901

@brotkrueml

Description

@brotkrueml

Summary

In Sphinx-based rendering section indexes hold only the anchors below the current place, for example:

Bildschirmfoto vom 2024-03-04 10-14-59

https://docs.typo3.org/m/typo3/reference-tsconfig/12.4/en-us/UserTsconfig/Options.html

PHP-based rendering seems to take all headers into account:

Bildschirmfoto vom 2024-03-04 10-15-54

https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/UserTsconfig/Options.html

MInd the additional "Properties" anchor in the last example.

Code snippet that reproduces the problem

Properties
==========

..  contents::
    :depth: 2
    :local:

additionalPreviewLanguages
--------------------------

some text

alertPopups
-----------

another text

should not render "Properties"

Expected output

  • additionalPreviewLanguages
  • alertPopups

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions