Skip to main content

@mdit/plugin-abbr


Plugin to support abbreviation tag <abbr>.

Usage

TS
import MarkdownIt from "markdown-it";
import { abbr } from "@mdit/plugin-abbr";

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

mdIt.render(`
*[HTML]: Hyper Text Markup Language
*[W3C]:  World Wide Web Consortium
The HTML specification is maintained by the W3C.
`);

Syntax

With this plugin you can declare abbreviations using reference beginning with an extra *:

*[Abbr word]: Abbr content

Escaping

Escaping can be done by adding \ to escape the * [ or ] marker:

\*[text]: content

will be

*[text]: content

Demo

Demo

The HTML specificationis maintained by the W3C.

*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web Consortium

The HTML specificationis maintained by the W3C.