marker

marker is an OTP library for parsing and rendering Markdown documents.

Currently it supports a most elements of the CommonMark specification listed here. See root README.md for details.

The goal is to support full CommonMark specification and then add add support for the other ones, e.g. Github Flavored Markdown.

Build

To build the library just run make. The default target build the library and runs unit tests as you can read below:

$ make help
build                          Builds library source with rebar3
default                        Builds the sources and run unit tests.
test                           Runs Eunit tests for all modules.

API

marker library consists of two modules and each of them exports one function:

Tree structure

The tree returned by the markdown/1 function has a regular recursive structure with text elements as leaves. Each element may be in either this form for non-leaves:

{<type_atom>, [<child_element>,...]}

or this - leaves:

{<type_atom>, <text>}

The <type_atom> above can be one of these:

Non-leaves, block elements:

Leaves: