https://github.com/ConstNW/necmark
necmark is bindings to cmark library (CommonMark implementation in C).
https://github.com/ConstNW/necmark
cmark commonmark haxe haxelib neko
Last synced: about 1 year ago
JSON representation
necmark is bindings to cmark library (CommonMark implementation in C).
- Host: GitHub
- URL: https://github.com/ConstNW/necmark
- Owner: ConstNW
- License: mit
- Created: 2019-06-10T10:56:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-11T09:44:22.000Z (almost 7 years ago)
- Last Synced: 2023-03-30T08:51:01.599Z (about 3 years ago)
- Topics: cmark, commonmark, haxe, haxelib, neko
- Language: Haxe
- Homepage:
- Size: 812 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# necmark
[](https://travis-ci.org/ConstNW/necmark)
necmark is a haxe/neko library that wraps subset of [cmark C library](https://github.com/commonmark/cmark) (that is one of reference implementations of [CommonMark](https://commonmark.org/)).
## Features
- no need to install ``libcmark``
- supported output: HTML, XML, CommonMark, man, LaTeX
- supported options: ``CMARK_OPT_UNSAFE``, ``CMARK_OPT_NOBREAKS``,
``CMARK_OPT_HARDBREAKS``, ``CMARK_OPT_SOURCEPOS``, ``CMARK_OPT_SMART``
- safe HTML output is on by default (like in ``libcmark``)
## Installation
haxelib install necmark
or
haxelib git https://github.com/ConstNW/necmark
### Usage
```haxe
var src = "Hello World!";
var n = new necmark.Necmark(src);
var out = n.render(ncrHtml(necmark.Necmark.RENDER_OPT_UNSAFE));
```
[more examples](https://github.com/ConstNW/necmark/tree/master/test)