This package provides footnote support for the `markdown-it` markdown parser, implementing both standard and inline footnote syntax based on Pandoc's definition. It integrates seamlessly as a `markdown-it` plugin, extending the parser's capabilities to render footnote references and their corresponding definitions into semantic HTML, complete with back-references. The current stable version is 4.0.0. As a plugin for `markdown-it`, its release cycle often aligns with `markdown-it`'s own, though it maintains independent versioning. Its primary differentiator is its robust and spec-compliant implementation of footnotes within the `markdown-it` ecosystem, offering dedicated customization points for the rendered HTML structure, ensuring flexibility for various output requirements.
npm install markdown-it-footnoteVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to initialize `markdown-it` with the footnote plugin and render markdown content containing both standard and inline footnotes.
Ensure your project uses `markdown-it` v5.0.0 or later. Upgrade `markdown-it` by running `npm install markdown-it@latest`.
Access and override rules via `md.renderer.rules.<rule_name>` as shown in the package's documentation examples. Refer to the official `markdown-it` documentation for details on its renderer architecture and rule customization.
Ensure `markdown-it` is imported and instantiated correctly before attempting to use the plugin: `const md = require('markdown-it')();`.Verify that your footnote syntax precisely matches the Pandoc definition (e.g., normal footnotes: `[^id]` for reference and `[^id]:` for definition; inline footnotes: `^[note content]`). Temporarily disable other `markdown-it` plugins to identify potential conflicts.