Use Kramdown on JRuby #58

Closed
wants to merge 1 commit into
from

Projects

None yet

8 participants

@headius
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
pangloss commented Mar 3, 2012

+1

@consiliens

+1

@headius
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.

@steveklabnik

👍

@PragTob
PragTob commented Mar 7, 2012

+1

@headius
headius commented Mar 9, 2012

Another approach...markdown_meta gem that prefers rdiscount but uses kramdown as a fallback: https://github.com/headius/markdown_meta

@cnstaging

+1

@robinst
robinst commented Jul 9, 2012

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

@cnstaging

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

ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
http://www.gnu.org/philosophy/bsd.html
http://www.dwheeler.com/essays/gpl-compatible.html

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

@davidfstr
Owner

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