markdown-it-sup-alt

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i markdown-it-sup-alt

Weekly Downloads

372

Version

1.0.2

License

MIT

Last publish

Collaborators

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