Skip to content

rustdoc: should expect and interpret valid Markdown #40560

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
projektir opened this issue Mar 15, 2017 · 2 comments
Closed

rustdoc: should expect and interpret valid Markdown #40560

projektir opened this issue Mar 15, 2017 · 2 comments
Labels
T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@projektir
Copy link
Contributor

projektir commented Mar 15, 2017

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.

@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Mar 15, 2017
@steveklabnik
Copy link
Member

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

I don't know why I want to say @cmr may, but maybe?

alexcrichton added a commit to alexcrichton/rust that referenced this issue Mar 27, 2017
…eklabnik

rustdoc to accept `#` at the start of a markdown file rust-lang#40560

This may be a bit odd if `#` and `%` lines are mixed up, but that's not something I've found while doing my search and replace.
@steveklabnik steveklabnik added the T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. label May 18, 2017
@Mark-Simulacrum
Copy link
Member

I believe this is handled correctly today, closing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants