markdown-it-sub-alt

<sub> tag for markdown-it markdown parser.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
markdown-it-sub-alt
001.0.07 years ago7 years agoMinified + gzip package size for markdown-it-sub-alt in KB

Readme

markdown-it-sub-alt
NPM version Coverage Status
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.

License

MIT