Skip to content

Conversation

@ffplexim
Copy link

@ffplexim ffplexim commented Dec 4, 2025

Fixes a bug where the current section is not highlighted in the navigation sidebar if the current page's hash does not match the "primary anchor" (usually extracted from the section's title). For example, if the page's RST source has

.. _foo:

Bar
===

and you link to it with :ref:`foo` , "Bar" will not get selected in the sidebar.

This is because the code for selecting the current section in the sidebar is still assuming that section elements are of the form <div class="section">, instead of <section>. (docutils' HTML5 writer has been emitting the latter since docutils 0.17.)

@ffplexim ffplexim requested a review from a team as a code owner December 4, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant