markdown-it-chptr
v0.1.0
Published
A Markdown-It plugin that enhances Chptr-related markup
Downloads
3
Maintainers
Readme
markdown-it-chptr
Chptr plugin for markdown-it markdown parser. Formats {markup} and {key: markup} notations.
something {marked} with some {foo: bar baz}
=> something <span class='chptr-markup'>marked</span> with some <span class='chptr-markup'><span class='chptr-key'>foo</span>bar baz</span>
Markup is based on chptr definitions.
Install
node.js, browser:
npm install markdown-it-chptr
bower install markdown-it-chptr --save
Use
var md = require('markdown-it')()
.use(require('markdown-it-chptr'));
md.render('something {marked} with some {foo: bar baz}') // => '<p>something <span class='chptr-markup'>marked</span> with some <span class='chptr-markup'><span class='chptr-key'>foo</span>bar baz</span></p>'
Differences in browser. If you load script directly into the page, without
package system, module will add itself globally as window.markdownitChptr
.
License
Based on Markdown-it-sup MIT