Use Kramdown on JRuby #58

wants to merge 1 commit into


None yet

8 participants

headius commented Mar 3, 2012

There's a number of libraries that depend on rdiscount directly, and since there's no "markdown" meta-gem like there is for json, this commit makes a 'java' version of the rdiscount gem that just uses the pure-Ruby Kramdown library.

The rdiscount tests have very specific requirements about HTML formatting, so I wan't quite able to get everything to pass; markdown_test.rb fails 7 tests, and rdiscount_test.rb appears to hang (possibly a JRuby bug). But the output from Kramdown is usually correct "in spirit" if not exactly what rdiscount would produce.

pangloss commented Mar 3, 2012




headius commented Mar 3, 2012

FWIW, I'm also interested in building a wrapper around some fast Java markdown lib, but on my benchmarks Kramdown on JRuby is only about 50% slower than rdiscount on 1.9.3.



PragTob commented Mar 7, 2012


headius commented Mar 9, 2012

Another approach...markdown_meta gem that prefers rdiscount but uses kramdown as a fallback:



robinst commented Jul 9, 2012

There's a little problem though: kramdown is GPLv3, so not compatible with the BSD license of RDiscount.


I would say that this is a problem for rdiscount. Even Berkeley Systems has switched from the 4 clause to the three clause.

I am not saying that Kramdown is the only solution, I am just looking for JRuby support for 32-bit/64-bit systems


RDiscount is designed as a thin wrapper around the Discount library, not a meta-gem for arbitrary Markdown parsers. Having RDiscount support both Discount and Kramdown would significantly complicate the interface.

Closing as By Design.

@davidfstr davidfstr closed this Jan 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment