Blog

Wednesday 21 August 2013

Showdown.js for Java

Need to have same output in front and back-end from Markdown sources? Checkout Showdown4j.
Recently we've developed Agido, a web application to manage project documentation.
Users provide data using Markdown syntax, which is dynamically converted to HTML using Showdown.js. They can also generate whole project documentation HTML file, but that is done in the back-end (Java).
We couldn't find any Markdown parser for Java that would output exactly the same markup as Showdown.js, so we created a wrapper for it.

It simply starts Rhino (JavaScript engine for Java), loads Showdown.js and passes Markdown markup to it.
It's twice slower than native Java parsers, but gives you 100% exact same output.

As always, your feedback is very precious to us.

Source code:
https://github.com/it-crowd/showdown4j

Maven artifacts can be fetched from artifactory.itcrowd.pl :
<dependency>
    <groupId>pl.itcrowd.showdown4j</groupId>
    <artifactId>showdown4j</artifactId>
    <version>1.0.0.Alpha1</version>
</dependency>
Enjoy!

No comments:

Post a Comment