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.
node.js, browser:
npm install markdown-it-sub --save
bower install markdown-it-sub --save
var md = require('markdown-it')()
.use(require('markdown-it-sub'));
md.render('H~2~0') // => '<p>H<sub>2</sub>O</p>'
Differences in browser. If you load script directly into the page, without
package system, module will add itself globally as window.markdownitSub
.