A small Clojure library to parse markdown to clojure data structure.
This is a wrapper over commonmark-java.
Add the following to your :dependencies
in project.clj
.
[markdown2clj "0.1.3-SNAPSHOT"]
In your code
(:require markdown2clj.core :as md)
(md/parse "# Heading")
=> {:document [{:heading [{:level 1}
{:text "Heading"}]}]}
where markdown-string
is the string you want to parse and params
is the optional parameters.
Valid params are :
:parse-tabbed-tables
which parses tables that are indented.This library supports the commonmark specs as supported by the commonmarkjava library. Which are
TODO:
sample.md
& sample.clj
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close