Skip to main content

@mdit/plugin-sub


Plugin to support subscript.

Usage

TS
import MarkdownIt from "subdown-it";
import { sub } from "@mdit/plugin-sub";

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

mdIt.render("19^th^");

Syntax

Use ^ ^ to mark the subscript.

Escaping

  • You can use \ to escape ^:

    19\^th^
    

    will be

    19^th^

Demo

19th

19^th^