Plugin to support subscript.
import MarkdownIt from "markdown-it"; import { sub } from "@mdit/plugin-sub"; const mdIt = MarkdownIt().use(sub); mdIt.render("H~2~O");
Use ~ ~ to mark the subscript.
~ ~
Escaping
You can use \ to escape ~:
\
~
H\~2~O
will be
H~2~O
H~2~O: H2O