New parser-based Markdown implementation for Java

Mathias mathias at parboiled.org
Mon May 3 03:42:29 EDT 2010


Markdowners,

just a short heads-up to a newly released Markdown implementation:
"pegdown" (http://github.com/sirthias/pegdown) implements a Java Markdown-to-HTML processor based on a PEG parser with the grammar being based on John MacFarlanes C implementation "peg-markdown".

pegdown uses "parboiled" (http://www.parboiled.org) for the actual parsing work and, as such, is quite easy to read, understand and therefore extend.
Currently pegdown fully passes the latest "official" Markdown test suite and optionally supports two small extensions.
Since I need table support in my own application I will also implement at least the PHP Markdown Extras table extension.

Two questions to you seasoned Markdown experts:

1. Test Suite: Is there anything more than John Grubers test suite that you know off? Maybe a good, large file for benchmarking? I'd like to compare pegdowns performance to some other implementations. I could also run the original test suite a few times in a row for benchmarking but maybe there is another more accepted benchmark available somewhere?
Since the Markdown PEG grammar appears to be quite "backtracky" it might be a good candidate for exercising the packrat optimization I plan for parboiled... however, I'd be happier to have it chew on some really large and complicated Markdown source for establishing a good baseline.

2. Markdown wiki: I'd like to advertise this new Java implementation on the original Markdown wiki, especially since the only other Java alternative (MarkdownJ) probably doesn't cut it in many cases. However, it seems account creation for the wiki is defunct so that only people with existing accounts can make changes. Would someone be able to add a link to pegdown to the "list" of Java implementations?
Of course, I would also do it myself if someone could give me a hint as to how to get my fingers in there....

Any feedback is of course more than welcome!

Cheers,
Mathias

---
mathias at parboiled.org
http://www.parboiled.org



More information about the Markdown-Discuss mailing list