Clojure library that converts markdown to Clojure data structures
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
src/markdown2clj
test/markdown2clj
.gitignore
CHANGELOG.md
LICENSE
README.md
project.clj

README.md

markdown2clj

Clojars Project

A small Clojure library to parse markdown to clojure data structure.

This is a wrapper over commonmark-java.

Usage

Add the following to your :dependencies in project.clj.

[markdown2clj "0.1.3"]

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

  • Paragraph
  • Bold & Italics
  • Heading
  • Table
  • Link
  • Images
  • Inline HTML
  • Indented Code Block
  • Ordered Lists
  • Bullet Lists
  • Blockquote