kivikakk/koino
CommonMark + GFM compatible Markdown parser and renderer
711afa05416d1d1512bccf798a332be494d08f5f.tar.gz
a4e784da8399c51d5eeb5783e6a485b960d5c1f9
27fe444ed1dfe78f177dfc26ec2765ab3c96d011
8bb5aad18f17724c5195f1e6f3a637e951bbcb07
Zig port of Comrak. Maintains 100% spec-compatibility with GitHub Flavored Markdown.
Add koino via the zig package manager:
$ zig fetch --save https://github.com/kivikakk/koino/archive/<commit hash>.tar.gz
Add the following to your build.zig
's build
function:
const koino_pkg = b.dependency("koino", .{ .optimize = optimize, .target = target });
exe.root_module.addImport("koino", koino_pkg.module("koino"));
Have a look at the bottom of parser.zig
to see some test usage.
$ git clone https://github.com/kivikakk/koino
$ zig build
./zig-out/bin/koino
There's a flake.nix
for building or getting a devShell if you're so-inclined.
Clone this repository (with submodules for the cmark-gfm
dependency):
$ git clone --recurse-submodules https://github.com/kivikakk/koino
$ cd koino
Build and run the spec suite.
$ zig build test
$ make spec
Command line:
$ koino --help
Usage: koino [-hu] [-e <str>...] [--header-anchors] [--smart] <str>
Options:
-h, --help
Display this help and exit
-u, --unsafe
Render raw HTML and dangerous URLs
-e, --extension <str>...
Enable an extension (table,strikethrough,autolink,tagfilter)
--header-anchors
Generate anchors for headers
--smart
Use smart punctuation
<str>
Library:
Documentation is TODO — see LoLa for an example of use. Note also the build.zig
declaration.