jstransformer-markdown-it
markdown-it support for JSTransformers.
Installation
npm install jstransformer-markdown-it
API
var md = ; mdbody;//=> '<h1>Hello World!</h1>'
Inline rendering
markdown-it supports rendering a Markdown string in an inline fashion (i.e. without wrapping <p>
):
var md = ;md;
In jstransformer-markdown-it, this can be achieved through the inline
option:
var md = ;mdbody;//=> '<p><strong>strong</strong></p>\n'mdbody;//=> '<strong>strong</strong>'
Plugins
Plugins in markdown-it are applied with the .use
function:
var md = ;md;md;md;md;
jstransformer-markdown-it allows doing the same through the plugins
option:
var md = ; mdbody;
If an element of the plugins
array is a string, it is require
d. If an element is an array, the first element will represent the plugin, while the rest are treated as options to that plugin.
Rules
markdown-it allows enabling and disabling specific rules through md.disable
and .enable
functions:
var md = ;md;md;md;md;
In jstransformer-markdown-it, the same thing can be done with the enable
and disable
options, with slightly modified syntax:
var md = mdbody;
License
MIT