Skip to content

Allow & render markdown for the description #165

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

Closed
tomaka opened this issue Jul 8, 2015 · 10 comments
Closed

Allow & render markdown for the description #165

tomaka opened this issue Jul 8, 2015 · 10 comments
Labels
C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Comments

@tomaka
Copy link
Contributor

tomaka commented Jul 8, 2015

I tried to write a nice description in my Cargo.toml:

description = """
Elegant and safe OpenGL wrapper.
Glium is an intermediate layer between OpenGL and your application. You still need to manually handle
the graphics pipeline, but without having to use OpenGL's old and error-prone API.
Its objectives:
 - Be safe to use. Many aspects of OpenGL that can trigger a crash if misused are automatically handled by glium.
 - Provide an API that enforces good pratices such as RAII or stateless function calls.
 - Be compatible with all OpenGL versions that support shaders, providing unified API when things diverge.
 - Avoid all OpenGL errors beforehand.
 - Produce optimized OpenGL function calls, and allow the user to easily use modern OpenGL techniques.
"""

But on crates.io the white spaces and line breaks are ignored, leading to an ugly mess: https://crates.io/crates/glium

In my opinion it would be nice to add a <pre> around or something.

@steveklabnik
Copy link
Member

Markdown usually requires a double space for a new paragraph, so if we were to do that, this would still end up looking like this, as a note...

@tomaka
Copy link
Contributor Author

tomaka commented Jul 8, 2015

In reality my Cargo.toml has better spacing. For some reason the extra lines seem to have been eaten by github when I copy-pasted it here.

@alexcrichton
Copy link
Member

Currently we don't allow markdown for various security concerns, but if we could mitigate those then we would just use a normal markdown parser.

@CruzBishop
Copy link
Contributor

What about a simple Markdown parser that, to start with, only formats italic, bold, strikethrough text and newlines?

I'm not sure how to go about it, but it's one of the things I wanted to work on eventually for experience

@azerupi
Copy link

azerupi commented Jul 30, 2015

only formats italic, bold, strikethrough text and newlines?

Links and lists are probably also a good idea

@carols10cents carols10cents changed the title Ugly formatting for the description Allow & render markdown for the description Dec 15, 2016
@carols10cents carols10cents added the C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works label Dec 15, 2016
@anthonynguyen
Copy link
Contributor

anthonynguyen commented Oct 4, 2017

This is fixed by #869?

@carols10cents
Copy link
Member

#869 renders the readme markdown, this issue is for supporting markdown in the description in Cargo.toml. Unless the readme markdown rendering is sufficient for @tomaka's needs?

@anthonynguyen
Copy link
Contributor

It seems like the goal was for the page on crates.io to have a nicely-formatted info section, which is achieved by rendering the readme

@tomaka
Copy link
Contributor Author

tomaka commented Oct 4, 2017

What @anthonynguyen said.

@tomaka tomaka closed this as completed Oct 4, 2017
@joshtriplett
Copy link
Member

I think there's still value in having (limited) markdown in the description, similar to what's supported in the README. See https://crates.io/crates/tide-tracing for an example, where it'd be nice to have those links get rendered as links wherever the description appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

No branches or pull requests

8 participants