mdast-util-inline-footnote
v1.0.1
Published
[mdast][] extensions to parse [Obsidian]-style inline footnotes and convert them to [GFM footnotes][gfm-footnote]. Intended to be used with [micromark-extension-inline-footnote][].
Maintainers
Readme
mdast-util-inline-footnote
mdast extensions to parse Obsidian-style inline footnotes and convert them to GFM footnotes. Intended to be used with micromark-extension-inline-footnote.
Install
This package is ESM only. In Node.js (version 16+), install with npm:
npm install micromark-extension-inline-footnote mdast-util-inline-footnoteIn Deno with esm.sh:
import { inlineFootnoteFromMarkdown } from "https://esm.sh/mdast-util-inline-footnote@1";In browsers with esm.sh:
<script type="module">
import { inlineFootnoteFromMarkdown } from "https://esm.sh/mdast-util-inline-footnote12?bundle";
</script>API
This package exports the identifiers
inlineFootnoteFromMarkdown and
inlineFootnoteToGfm.
There is no default export.
inlineFootnoteFromMarkdown()
Create an extension for
mdast-util-from-markdown
to enable inline footnotes in markdown.
Returns
Extension for mdast-util-from-markdown
(FromMarkdownExtension).
inlineFootnoteToGfm
Utility function for converting all inline footnotes in an abstract syntax tree to a GFM footnote reference (in place) and a GFM footnote definition (at the end of the tree).
