r/Clojure • • 18d ago

Markdown to HTML in Clojure today: markdown-clj, nextjournal/markdown, or a Java library?

There are several ways to turn markdown into HTML from Clojure now: markdown-clj, nextjournal/markdown (built on CommonMark), or a Java library such as flexmark or commonmark-java through interop.

  • Which do you use, and does it handle tables and the other GitHub extras properly?
  • Do you need it to run in ClojureScript as well?
  • Does anyone parse markdown into data (hiccup) and work on that, rather than going straight to HTML?

I use markdown-clj (in mdserve-starter, a local markdown viewer), and it needs a few workarounds for cases it renders wrongly, which is why I'm asking.

13 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/cjmurrr 17d ago

Thanks, I hadn't come across cybermonday. My tool runs on Babashka, and as Borkdude points out, that already has nextjournal/markdown built in, so I'll try that first. Good to know cybermonday is there if it falls short.