Skip to content

Prefer existing label to generate HTML node ID when possible #1961

@sehmaschine

Description

@sehmaschine

The HTML which is produced with labels before section is quite arbitrary. It sometimes works, but most of the time it doesn't.

Here's an example:

.. _attachments-fields:

Felder
++++++

This should lead to:

<div class="section" id="attachments-fields">
    <span id="id2"></span>
    <h3>Felder
        <a class="headerlink" href="#attachments-fields" title="Permalink to this headline">¶</a>
    </h3>

But it actually produces this:

<div class="section" id="felder">
    <span id="attachments-fields"></span>
    <h3>Felder
        <a class="headerlink" href="#felder" title="Permalink to this headline">¶</a>
    </h3>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions