Markdown to HTML with Java/Scala

JavaScalaMarkdown

Java Problem Overview


I am aware of following projects (mostly from http://www.w3.org/community/markdown/wiki/MarkdownImplementations):

implemented in Java:

implemented in Scala:

Q: What are the respective performance characteristics, pitfalls, quirks? Which ones support the Github extensions? Which one would you recommend for a Play! / Scala application?

Java Solutions


Solution 1 - Java

The fantastic microbenchmark tool created by MarkdownPapers' author compares the performance for the following implementations:

  • MarkdownPapers
  • PegDown
  • Knockoff
  • MarkdownJ
  • TxtMark

TxtMark far exceeds the performance of the other tools, as shown in the following graph:

Performance comparisons of markdown implementations

PegDown, which supports many GitHub extensions and others, is far more fully featured. Custom plugins or extensions are also possible.

My use case involved processing markdown from an administrative screen where performance was less impactful than a rich feature set, which meant PegDown won over TxtMark.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionErich SchreinerView Question on Stackoverflow
Solution 1 - JavaadarshrView Answer on Stackoverflow