fence customize plugin for markdown-it
yarn add markdown-it-fence --save
npm install markdown-it-fence --save
const markdownitfence = require('markdown-it-fence')
function yourPlugin (md, options) {
return markdownitfence(md, 'yourPluginName', {
marker: yourMarker, // default is '`'
render: yourRender,
validate: yourValidate
})
}
const md = require('markdown-it')();
md.use(yourPlugin).render(`content you want to parse`)
Type: string
Default: `
Marker of fence block.
Type: function
Default: defaultRender
Render function.
Type: function
Default: defaultValidate
Validate function.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
markdown-it-fence © geekplux, Released under the MIT License.
Authored and maintained by geekplux with help from contributors (list).
github.com/geekplux · GitHub @geekplux · Twitter @geekplux