This package provides a dedicated plugin for the popular `markdown-it` markdown parser, specifically designed to render superscript text. It utilizes a Pandoc-like `^...^` syntax; for instance, the input `29^th^` will be processed into `29<sup>th</sup>`. The current stable version is 2.0.0. As a single-feature plugin for a stable core library like `markdown-it`, its release cadence is generally infrequent, primarily driven by maintenance needs, compatibility updates with `markdown-it` itself, or bug fixes. A key characteristic is its straightforward integration with `markdown-it` and its adherence to a commonly understood markup convention for superscripts, making it easy to adopt for existing `markdown-it` projects. Notably, the plugin currently does not support nested superscript markup.
npm install markdown-it-supVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize `markdown-it` and apply the `markdown-it-sup` plugin to process and render superscript markdown syntax.
Ensure your `markdown-it` dependency is at least `^4.0.0` to avoid parsing errors or plugin initialization failures. Update with `npm install markdown-it@^4.0.0`.
Avoid nesting `^...^` syntax. If complex superscript structures are needed, consider custom rendering logic or an alternative plugin that specifically supports nesting.
For browser usage, either integrate with a module bundler (Webpack, Rollup, etc.) and use standard `import` statements, or ensure you reference `window.markdownitSup` directly after the script is loaded if not using a bundler.
Ensure you have `markdown-it` installed (`npm install markdown-it`) and that you are calling `.use()` on an instantiated `MarkdownIt` object, e.g., `const md = new MarkdownIt();`.
Install the package using `npm install markdown-it-sup` and verify the import/require statement matches the package name exactly.