hashobject / perun

Programmable static site generator built with Clojure and Boot (HELP NEEDED!)
https://perun.io
Eclipse Public License 1.0
351 stars 38 forks source link

Upgrade Pegdown to flexmark-java #214

Closed NightMachinery closed 5 years ago

NightMachinery commented 6 years ago

Pegdown is long deprecated: :>>> DEPRECATION NOTE <<<: Although still one of the most popular Markdown parsing libraries for the JVM, pegdown has reached its end of life.

The project is essentially unmaintained with tickets piling up and crucial bugs not being fixed. pegdown's parsing performance isn't great. In some cases of pathological input runtime can even become exponential, which means that the parser either appears to "hang" completely or abort processing after a time-out.

Therefore pegdown is not recommended anymore for use in new projects requiring a markdown parser. Instead I suggest you turn to @vsch's flexmark-java, which appears to be an excellent replacement for these reasons:

Modern parser architecture (based on commonmark-java), designed from the ground up as a pegdown replacement and supporting all its features and extensions 30x better average parsing performance without pathological input cases Configuration options for a multitude of markdown dialects (CommonMark, pegdown, MultiMarkdown, kramdown and Markdown.pl) Actively maintained and used as the basis of an IntelliJ plugin with almost 2M downloads per year The author (@vsch) has actively contributed to pegdown maintenance in the last two years and is intimately familiar with pegdown's internals and quirks. In case you need support with migrating from pegdown to flexmark-java, @vsch welcomes inquiries in here or here.

bhagany commented 6 years ago

This has already been done for some time, check it out: https://github.com/hashobject/perun/blob/master/src/io/perun/markdown.clj

Are we still referencing Pegdown somewhere?

allentiak commented 5 years ago

I have checked the code. And no, we don't :-)