-
Notifications
You must be signed in to change notification settings - Fork 649
Only interpret README files whose filename ends in .md
as markdown, render plain text otherwise
#995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same with my crate. It might be too difficult to support asciidoc at this stage, but I'd suggest not rendering anything if the file doesn't end in ".md". |
If someone is interested, I started a crate to parse asciidoctor. |
.md
as markdown, render plain text otherwise
According to Will fix this tomorrow. |
Looks like we need to transmit the README filename while uploading; right now we only upload the content: https://github.com/rust-lang/cargo/blob/ff9ca41fe754f94320ebe69acf4f44842edde3e4/src/cargo/ops/registry.rs#L122-L124. |
@Susurrus I don't disagree, but RFCs and reality are two very different things. I can find thousands (!) of examples of the alternatives not listed in the RFC by searching around here. |
It's worth noting RFC7763 refers to Markdown, and not CommonMark. The CommonMark spec doesn't suggest anything about file endings. (Notably, RFC7764 — while maintaining that ".md" and ".markdown" are the suggested file endings — also refers to ".mkd" files a few times) |
transmit: send README filename as well as content This is required to solve rust-lang/crates.io#995; we currently only send the README content, but not the name of the README itself, so it's not possible to determine how we should render it. I've confirmed the existing crates.io server silently ignores the new field, so this should be safe to roll out whenever.
1134: Record readme filename; use to determine whether to render as Markdown or not r=carols10cents Fixes #995. Depends on rust-lang/cargo#4633 to have the desired effect, but won't break in the absence of that PR; we'll just assume the readme is called `"README.md"` if the client doesn't report one. Small CSS fix included to wrap extra long lines. Comparison of render of https://crates.io/crates/relm's README: | Before | After | | :-: | :-: | |  |  |
Hello.
If the readme is in the asciidoc(tor) format, it is not rendered correctly on crates.io.
Here's an example.
Thanks to fix this.
The text was updated successfully, but these errors were encountered: