# 
[](https://hex.pm/packages/cmark)
[](http://hexdocs.pm/cmark/)
[](https://github.com/asaaki/cmark.ex/blob/master/LICENSE)
[](https://github.com/asaaki/cmark.ex/actions?query=workflow%3ACI)
[](https://coveralls.io/r/asaaki/cmark.ex)
[](http://inch-ci.org/github/asaaki/cmark.ex)
**Cmark** is an Elixir NIF for [cmark (C)](https://github.com/jgm/cmark), a parser library following the [CommonMark](http://commonmark.org/) spec.
## CommonMark
> A strongly defined, highly compatible specification 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:
```elixir
{:cmark, "~> 0.9"}
```
## Usage
```elixir
Cmark.to_html("a markdown string")
#=> "<p>a markdown string</p>\n"
```
It supports conversions to HTML, XML, Manpage, CommonMark, and Latex.
Latest API docs can be found at: <http://hexdocs.pm/cmark/Cmark.html>
## Licenses
- Cmark.ex: [LICENSE](https://github.com/asaaki/cmark.ex/blob/master/LICENSE) (MIT)
- cmark (C): [c_src/COPYING](https://github.com/asaaki/cmark.ex/blob/master/c_src/COPYING) (multiple)