@mirrordown/mdit-sup
v0.1.3
Published
A markdown-it plugin for superscript syntax (^text^), rendering <sup> elements.
Readme
@mirrordown/mdit-sup
Part of Mirrordown — a suite of markdown syntax extensions for the unified and markdown-it ecosystems.
A markdown-it plugin for the sup syntax extension.
Overview
The sup plugin renders ^text^ as an HTML <sup> element, representing superscript text.
<sup>text</sup>Syntax
Wrap text in single carets to render it as superscript:
E = mc^2^
The Pythagorean theorem: a^2^ + b^2^ = c^2^Install
npm install @mirrordown/mdit-supStandalone
import MarkdownIt from "markdown-it";
import { sup } from "@mirrordown/mdit-sup";
const md = new MarkdownIt().use(sup);VitePress
// .vitepress/config.ts
import { defineConfig } from "vitepress";
import { sup } from "@mirrordown/mdit-sup";
export default defineConfig({
markdown: {
config: (md) => md.use(sup)
}
});Documentation
Full documentation, more examples, and configuration options: github.com/mirrordown/mirrordown (dedicated docs site coming soon).
License
MIT © Drake Costa
