用 Java/Scala 标记 HTML

我知道以下项目(大部分来自 http://www.w3.org/community/markdown/wiki/MarkdownImplementations) :

用 Java 实现:

在 Scala 中实现:

问: 各自的表现特点、缺陷和怪癖是什么?哪些支持 Github 扩展?你会推荐哪一部戏剧!/Scala 应用程序?

34024 次浏览

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.