Closed
Description
If you've arrived via a warning and what to know what is going on, see this comment.
- implement Pulldown rendering behind a flag (Replace hoedown with pull in rustdoc #40338, Re-enable hoedown by default #41431)implement warnings for changes (Add warnings when rustdoc html rendering differs #41991)begin warning cycle (Print rustdoc rendering warnings all the time #45324)move to Pulldown by default (Switch to pulldown as default markdown renderer #47398)remove Hoedown, the difference warnings, the
html-diff
dependency, etc (Remove hoedown from rustdoc #48274)
Blocking warning cycle
- move warnings to off by default (on if user chooses Pulldown rendering)format warning, and add information about how to remedyassess and mitigate false positivesmove warnings to on by default
Metadata
Metadata
Assignees
Labels
Area: Documentation for any part of the project, including the compiler, standard library, and toolsCategory: An issue tracking the progress of sth. like the implementation of an RFCHigh priorityRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
nrc commentedon Aug 31, 2017
cc @rust-lang/dev-tools @rust-lang/docs
nrc commentedon Aug 31, 2017
What is happening?
We're changing the way that Rustdoc renders markdown in your docs. We're moving to use a new parser and renderer (Pulldown) which is standards compliant (CommonMark), more robust, less buggy, and written in Rust. You can use Pulldown on nightly rustdoc by using the
--enable-commonmark
command line argument.However, there are some changes to how your docs might be rendered. The known issues are:
2^5
, you must use2<sup>5</sup>
instead.<>
around them**
to work as emphasis in PulldownWe are currently providing warnings (when running Rustdoc) if the documentation for your crate will change with the new renderer. You should check these warnings to ensure that your documentation still renders correctly.
nrc commentedon Sep 5, 2017
Update: #44238 and #44329 addressed some issues with the warnings and it is now off by default (it was on by default for one nightly release). The next step is to assess the false positive situation. @QuietMisdreavus is going to list some good test crates and obtain the warning output for them. @GuillaumeGomez is going to try some experiments to reduce the false positive rate.
nrc commentedon Sep 14, 2017
ping @QuietMisdreavus did you get a chance to look at good test crates?
QuietMisdreavus commentedon Sep 14, 2017
After getting the first false positive i didn't dig much farther. However, a quick check of a handful of popular crates shows some more leads:
time
looks like it has some true positives, in the form of^
not being<sup>
:mio
looks like it gets "out of sync" when looking at link tags? This probably requires a closer look.Something similar happens in
hyper
as well:I'll add more samples over time.
QuietMisdreavus commentedon Sep 14, 2017
The results for
webpki
allude to the source of the link tag issue: It looks like one parser automatically linkifies things ininline code
spans?QuietMisdreavus commentedon Sep 14, 2017
On a farther read, the
webpki
may be a true rendering difference: The line being rendered there doesn't use backticks or indentation: it's a manual<code>
span written into the docs. This may have been a deliberate decision to have the link in the code span, but it seems that pulldown suppresses the link generation that hoedown did, even when it's a manual<code>
tag.EDIT: gonna add farther notes to this comment rather than spamming the thread.
time
's rendering differences seem to all be true differences: The aforementioned<sup>
change, a link anchor being spread across multiple lines (proper link in hoedown, broken tag in pulldown), and asterisks inline to a word being treated differently (hoedown left them as asterisks, pulldown created an<em>
tag for them).EDIT 2:
mio
is also all legit. The last three are also about the case-insensitivity of reference links. The first is a new difference: link reference tags are whitespace-stripped in Pulldown, but not Hoedown. The published0.6.10
has no link for "readiness state" because the anchor added a space before the closing bracket. Pulldown stripped that space and completed the link, hence getting "out of sync" because there's an anchor tag where there wasn't one before.EDIT 3:
hyper
is also all legit. Several URLs that aren't auto-linked in Pulldown, and a couple places where there wasn't a newline between a regular paragraph and a ``` code block.EDIT 4:
mime
introduces yet another new difference:Here, the entire docstring is a single asterisk. Hoedown leaves it alone, puts it into the output as-is. Pulldown creates a new unordered list with an single, empty item.
84 remaining items