No description
Find a file
2020-08-21 18:29:09 +08:00
.github/workflows Make static link 2020-08-21 15:11:18 +08:00
libcmark@06e3af57a1 Compiles with libcmark 2020-08-21 12:53:37 +08:00
src More function wrappers 2020-08-21 18:29:09 +08:00
tests Initial commit 2020-08-20 17:05:35 +08:00
.editorconfig minor changes 2020-08-20 17:18:44 +08:00
.gitignore Changes 2020-08-21 18:01:53 +08:00
.gitmodules Compiles with libcmark 2020-08-21 12:53:37 +08:00
cmark.nimble Changes 2020-08-21 18:01:53 +08:00
LICENSE Initial commit 2020-08-20 17:05:35 +08:00
README.md minor changes 2020-08-20 17:18:44 +08:00

nim-cmark

libcmark wrapper for Nim.

Installation

nim-cmark requires that libcmark is installed and the shared library is available.

How to install libcmark?

macOS

brew install cmark

Ubuntu

sudo apt install libcmark-dev

Windows

Refer to https://github.com/commonmark/cmark#installing-windows.

Getting Started

import cmark

let markdown = """
# hello

```nim
echo "hello world"
```
"""

echo markdown_to_html(markdown, CMARK_OPT_DEFAULT)

Got output:

<h1>hello</h1>
<pre><code class="language-nim">echo &quot;hello world&quot;
</code></pre>

License

All code is released under the Apache-2.0 license.