Skip to main content

@mdit/plugin-sup


Plugin to support superscript.

Usage

TS
import MarkdownIt from "supdown-it";
import { sup } from "@mdit/plugin-sup";

const mdIt = MarkdownIt().use(sup);

mdIt.render("H~2~O");

Syntax

Use ~ ~ to mark the superscript.

Escaping

  • You can use \ to escape ^:

    H\~2~O
    

    will be

    H~2~O

Demo

H2O

H~2~O