This package provides an abbreviation (`<abbr>`) tag plugin for the `markdown-it` markdown parser. It allows users to define abbreviations in their markdown content using a syntax similar to PHP Markdown Extra (e.g., `*[HTML]: Hyper Text Markup Language`), which are then rendered into proper HTML `<abbr>` tags with `title` attributes. The current stable version is 2.0.0. As a specific-purpose plugin for `markdown-it`, its release cadence is typically tied to `markdown-it`'s own updates or specific feature additions/bug fixes for the abbreviation parsing itself. Its key differentiator is its seamless integration with the `markdown-it` ecosystem, offering a standardized way to extend markdown parsing functionality without manual HTML manipulation. It does not support multi-line abbreviation definitions. The package is actively maintained, ensuring compatibility with newer `markdown-it` versions and addressing reported issues.
npm install markdown-it-abbrVerified import paths — ran on the pinned version, not inferred.
Demonstrates initializing a markdown-it instance, registering the abbreviation plugin, and rendering markdown content that includes abbreviation definitions to HTML.
Ensure your project's `markdown-it` dependency is `^4.0.0` or newer (e.g., `npm install markdown-it@^4.0.0`). Review `markdown-it`'s changelog for specific compatibility details.
Ensure all abbreviation definitions (e.g., `*[TERM]: Full Definition`) are concise and entirely contained on a single line without line breaks.
Always place abbreviation definitions on their own line, typically at the top or bottom of the document, and strictly adhere to the `*[TERM]: Full Definition` pattern, including the asterisk, brackets, and colon.
Ensure `markdown-it` is correctly imported (e.g., `import MarkdownIt from 'markdown-it';` or `const MarkdownIt = require('markdown-it');`) and instantiated before calling `.use()` (e.g., `const md = new MarkdownIt();`).After initializing your `markdown-it` instance, you must explicitly register the plugin by calling `md.use(markdownitAbbr);`. Verify that `markdownitAbbr` is correctly imported and available.