{"library":"markdown-it-footnote","title":"markdown-it Footnote Plugin","description":"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.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install markdown-it-footnote"],"cli":null},"imports":["const markdownitFootnote = require('markdown-it-footnote');","const markdownitFootnote = window.markdownitFootnote;"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const markdownit = require('markdown-it');\nconst markdownitFootnote = require('markdown-it-footnote');\n\n// Initialize markdown-it and apply the footnote plugin\nconst md = markdownit().use(markdownitFootnote);\n\nconst markdownContent = `\nHere is a normal footnote reference,[^1] and another.[^longnote]\n\nHere is an inline note.^[Inlines notes are easier to write, since\nyou don't have to pick an identifier and move down to type the\nnote.]\n\n[^1]: Here is the footnote.\n\n[^longnote]: Here's one with multiple blocks.\n\n    Subsequent paragraphs are indented to show that they\nbelong to the previous footnote.\n\nThis paragraph won’t be part of the note, because it\nisn’t indented.\n`;\n\n// Render the markdown content to HTML\nconst html = md.render(markdownContent);\nconsole.log(html);","lang":"javascript","description":"Demonstrates how to initialize `markdown-it` with the footnote plugin and render markdown content containing both standard and inline footnotes.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}