1.0.2 • Published 8 years ago

markdown-it-sup-alt v1.0.2

Weekly downloads
111
License
MIT
Repository
github
Last release
8 years ago

markdown-it-sup-alt

Build Status NPM version Coverage Status

Superscript (<sup>) tag plugin for markdown-it markdown parser.

v1.+ requires markdown-it v4.+, see changelog.

29^th^ => 29<sup>th</sup>

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). If using this plugin, it's recommended that you also use a math plugin so that text like 2^4 + 3^5 is handled properly.

Install

node.js, browser:

npm install markdown-it-sup-alt --save
bower install markdown-it-sup-alt --save

Use

var md = require('markdown-it')()
            .use(require('markdown-it-sup-alt'));

md.render('29^th^') // => '<p>29<sup>th</sup></p>'

Differences in browser. If you load script directly into the page, without package system, module will add itself globally as window.markdownitSup.

License

MIT