Skip to content
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

Markdown support #43

Open
JonnieCache opened this issue Oct 23, 2011 · 5 comments
Open

Markdown support #43

JonnieCache opened this issue Oct 23, 2011 · 5 comments

Comments

@JonnieCache
Copy link
Contributor

Or at least some subset of it.

If we want to keep it pure ruby then the obvious choice of parser/renderer is kramdown. This is not as fast or as secure as that Redcarpet library github wrote, but thats probably not a problem right now

My instinct would be to create a separate Markdown module to encapsulate everything, making it easier to swap it for a C based renderer in future if needed. Then just store a body_html string on the comment objects which gets rendered to the page, alongside the original user-submitted markdown for use when a comment is edited.

I don't know, maybe extracting it to a module is unnecessary.

Thoughts?

@telemachus
Copy link

I'm very much in favor of Markdown, and as I mention elsewhere, it solves a few problems at once. Overall though I would go for Redcarpet since it's faster and safer. That said, I have zero experience with kramdown, so maybe it has benefits I'm not thinking of.

@dannymcc
Copy link

+1 for Redcarpet

@JonnieCache
Copy link
Contributor Author

I would personally vote for redcarpet as well, however it is not pure ruby, and this goes against antirez's stated goal of having as few dependencies as possible.

Obviously we aren't going to be able to follow the "Do everything you can to avoid depending on new ruby gems." rule, writing our own markdown interpreter from scratch just for this project would be absolute madness.

The only way that would be appropriate would be if we wanted to only support a very small subset of markdown, like on HN.

Personally I am actually in favor of that, as it will keep the comments from getting too ugly.

EDIT: whoops, hit the comment-and-close button by mistake. Sorry.

@seppo0010
Copy link
Contributor

Related issues:

@basicallydan
Copy link

👍 Looks like this particular feature request needed some love.

EchoJS uses LamerNews and Markdown would be pretty sweet :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants