A safe markdown engine
Goal:
Not goal:
Install dependencies:
$ opam install --deps-only . [--with-test]Build:
$ make [|test|doc|clean|fmt]It will make
_build/install/default/bin/kkmarkdown_build/install/default/share/kkmarkdown/kkmarkdown.jsIn shell (using stdin):
$ kkmarkdown
*abc* (then control+D)
<p><em>abc</em></p>or (using file)
$ echo "*abc*" > a
$ kkmarkdown a
<p><em>abc</em></p>In html:
<script src='https://kkeun.net/kkmarkdown.js'></script>
<script>result = kkmarkdown.trans("*abc*");</script>There is unsafe mode that can be used when the markdown source is trustworthy. See below for supported syntax in the unsafe mode: https://kkeundotnet.github.io/kkmarkdown/kkmarkdown/syntax.html
In shell:
$ kkmarkdown --unsafe [FILE]In html:
<script>result = kkmarkdown.unsafe("*abc*");</script>RSS mode suppresses classes and inline HTMLs in the unsafe mode. HTML classes or inline HTMLs including javscripts may not work properly in external feed readers.
$ kkmarkdown --rss --unsafe [FILE]