@mdit/plugin-ruby
Plugin to support ruby annotation <ruby>.
Usage
import MarkdownIt from "markdown-it";
import { ruby } from "@mdit/plugin-ruby";
const mdIt = MarkdownIt().use(ruby);
mdIt.render("{中国:zhōng|guó}");Syntax
Use {ruby base:ruby text1|ruby text2|...} to add ruby annotation.
Escaping
You can use
\to escape{:or}:\{中国:zhōng|guó}will be
{中国:zhōng|guó}
Demo
{中国:zhōng|guó}: 中国