markdown-it-sub-alt

1.0.0 • Public • Published

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

/markdown-it-sub-alt/

    Package Sidebar

    Install

    npm i markdown-it-sub-alt

    Weekly Downloads

    325

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • jay-hodgson
    • xschildwachter
    • agendel
    • nickgros
    • roccbot