Skip to content

footnote in ASCIIDoc header confuses the ASCIIDoc renderer #183

@hawkw

Description

@hawkw

This is probably an issue with the asciidoc renderer in general rather than the RFD site in particular, but I'm reporting it here.

When a footnote occurs in an ASCIIDoc header, the renderer will incorrectly repeat the same footnote number(s) for footnotes in body text, and the links back from the footnote section for footnotes in headers will link back to the second use of that footnote number (in the body text). For instance, RFD 564 contains a header with footnotes:

== Affected componentsfootnote:[As of 2025-03-30]footnote:[Source: The Omicron repository contains tooling and developer-maintained metadata that seeks to identify, classify, and validate every OpenAPI-based dependency in the system.  The `cargo xtask ls-apis check` tool prints a summary of the APIs that are currently classified as client-side-versioned.]

The superscripts for the footnote render correctly in the header:

Image

But, they do not link to the footnote section. I believe that this is because the entire content of the header is a link to its section anchor, so clicking on the footnotes link to there instead.

In the footnotes, the footnote numbers 1 and 2 are repeated:

Image

The first footnotes numbered 1 and 2 are the footnotes in the header, while the second footnotes numbered 1 and 2 occur later in body text.

Clicking on the back arrow link from the first footnote numbered 1 or 2 goes to the second instance of that footnote number (in the body text), rather than in the header.

This was all pretty confusing, and it would be nice for it to be fixed. I'll admit, however, that footnotes in a header are also kind of a weird edge case and maybe we should just discourage their use...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions