Skip to content

rustdoc: should expect and interpret valid Markdown #40560

Closed
@projektir

Description

@projektir

rustdoc currently expects all Markdown files to start with the % symbol, turning that line into an <h1> heading with the corresponding title. The % symbol is not part of Markdown, and this notation seems unnecessary.

Instead, rustdoc should be able to read #, ##, and so on, as expected, turning them into <h1>, <h2>, respectively, and then correctly numbering the child headings. The first heading in the file can be used for the title and table of contents parenting. This should fix #39850.

This will change rustdoc to additionally process the first # heading (or any first heading?) the way it currently processes the % heading.

I plan to work on this issue, but if anyone knows something about the history of % that could be useful information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions