markdown-it-sub-alt
v1.0.0
Published
<sub> tag for markdown-it markdown parser.
Downloads
673
Readme
markdown-it-sub-alt
Subscript (
<sub>
) tag plugin for markdown-it markdown parser.
v1.+ requires markdown-it
v4.+, see changelog.
H~2~0
=> H<sub>2</sub>O
Markup is based on pandoc definition. But nested markup is currently not supported.
Forked from upstream to allow unescaped whitespace within delimiters (still must be in the same line).
Install
node.js, browser:
npm install markdown-it-sub-alt --save
bower install markdown-it-sub-alt --save
Use
var md = require('markdown-it')()
.use(require('markdown-it-sub-alt'));
md.render('Challenge~Phase 1~') // => '<p>Challenge<sub>Phase 1</sub></p>'
Differences in browser. If you load script directly into the page, without
package system, module will add itself globally as window.markdownitSub
.