postmd
v0.0.2
Published
PostMd is a tool to transform markdown with JS pluigns
Maintainers
Readme
PostMD
Usage
npm i -S postmd
const PostMD = require('postmd');
const bemjson = require('postmd/plugins/postmd-bemjson');
const json = PostMD('I am using __markdown__.', {
transform: {
format: 'json', // Default: html
plugins: bemjson({ scope: 'md' })
}
});
console.log(JSON.stringify(json));
// [{"tag":"p","content":["I am using ",{"tag":"strong","content":["markdown"]},"."],"block":"md-paragraph"},"\n"]PostMD(md, options) ⇒ Object.<{String | PostHTMLTree>
PostMD Options
parser- custom mardown parsertransformformat- result kind:'html'|'json'plugins<Function|Array> - transform plugins
