Cmark
Elixir NIF for cmark (C), a parser library following the CommonMark spec.
CommonMark
A strongly specified, highly compatible implementation of Markdown
For more information visit http://commonmark.org/.
Install
Prerequisites
You need a C compiler like gcc
or clang
.
mix.exs
Add this to your dependencies:
{:cmark, "~> 0.6"}
Usage
Quick example
Cmark.to_html "a markdown string"
#=> "<p>a markdown string</p>\n"
Available functions
HTML
XML
Manpage
CommonMark
Cmark.to_commonmark/1
Cmark.to_commonmark/2
Cmark.to_commonmark/3
Cmark.to_commonmark_each/2
Cmark.to_commonmark_each/3
LaTeX
Documentation
Latest API docs can be found at: http://hexdocs.pm/cmark/0.6.2/Cmark.htmlLicenses
- Cmark.ex: LICENSE (MIT)
- cmark (C): c_src/COPYING (multiple)