This is a wrapper around 3BMD markdown parser which produces documents in CommonDoc format. Also, it is able to render CommonDoc documents into the Markdown.

It is a proof of the concept, but I'm already using it in the documentation builder 40ANTS-DOC.

Note. This library is not compatible with CommonMark yet.


This library available only at now. To install it using Quicklisp client, do:

(ql-dist:install-dist ""
                      :prompt nil)

(ql:quickload :commondoc-markdown)

Parsing Markdown to CommonDoc

CL-USER> (common-doc.format:parse-document
          (make-instance 'commondoc-markdown:markdown)
# Hello World

* First item
* Second item
#<COMMON-DOC:SECTION title: Hello World, ref: NIL>

Writing CommonDoc to Markdown

Now we can render our document back to Markdown:

CL-USER> (common-doc.format:emit-to-string
          (make-instance 'commondoc-markdown:markdown)
"# Hello World

* First item
* Second item



By default it is T, but you can bind it to NIL, to prevent short link references generation.

Minumum length of the hash for generated markdown links. This works only when *generate-short-link-references* variable is set to T.

When this variable is T (default), emitter outputs a raw html <a name="some-id"></a> before each Markdown section.