@mdit/plugin-sub
Plugin to support subscript.
Usage
import { sub } from "@mdit/plugin-sub";
import MarkdownIt from "markdown-it";
const mdIt = new MarkdownIt().use(sub);
mdIt.render("H~2~O");Syntax
Use ~ ~ to mark the subscript.
Escaping
You can use
\to escape~:H\~2~Owill be
H~2~O
Demo
H~2~O: H2O
See the comparison report for the full upstream comparison.