its_me
its_me

Reputation: 11338

Ruby markdown interpreter with syntax similar to GitHub Flavored Markdown?

I run a blog using Jekyll, and thought I'd settle with Redcarpet markdown interpreter as it's developed and used by GitHub.

Well, I just happened to come across a bug, went to checkout the issues, and found this.

Maintainer says, "As you probably have noticed (har har har har) I don't have time to maintain Redcarpet anymore. It's not a priority for me (I find Markdown thoroughly boring) and it's not a priority for GitHub, because we no longer use it in production."

So...

  1. Is there a good Ruby markdown interpreter (i.e. actively developed, with sane syntax) that I can use with Jekyll (& pygments)?

  2. Even better, a markdown interpreter with syntax similar to (or at least close to) GitHub Flavored Markdown?

Upvotes: 5

Views: 3577

Answers (1)

RyanScottLewis
RyanScottLewis

Reputation: 14016

https://github.com/vmg/redcarpet Redcarpet is very actively developed and was updated about 8 hours ago (at the time of this writing.)

For "flavoring" your Markdown: https://rubygems.org/gems/github-markdown

To convert Markdown to HTML:

GitHub::Markdown.render_gfm("# Header")

To render within Rails:

GitHub::Markdown.render_gfm("# Header").html_safe

Want syntax highlighting? https://github.com/simplabs/highlight https://alphahydrae.com/2013/01/markdown-views-in-rails/

Cheers!

Upvotes: 10

Related Questions