Skip to content

necmark is bindings to cmark library (CommonMark implementation in C).

License

Notifications You must be signed in to change notification settings

ConstNW/necmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

necmark

Build Status

necmark is a haxe/neko library that wraps subset of cmark C library (that is one of reference implementations of CommonMark).

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

var src = "Hello World!";
var n = new necmark.Necmark(src);
var out = n.render(ncrHtml(necmark.Necmark.RENDER_OPT_UNSAFE));

more examples