Class FootnotesExtension

java.lang.Object
org.commonmark.ext.footnotes.FootnotesExtension
All Implemented Interfaces:
Extension, Parser.ParserExtension, HtmlRenderer.HtmlRendererExtension, MarkdownRenderer.MarkdownRendererExtension

Extension for footnotes with syntax like GitHub Flavored Markdown:

 Some text with a footnote[^1].

 [^1]: The text of the footnote.
 
The [^1] is a FootnoteReference, with "1" being the label.

The line with [^1]: ... is a FootnoteDefinition, with the contents as child nodes (can be a paragraph like in the example, or other blocks like lists).

All the footnotes (definitions) will be rendered in a list at the end of a document, no matter where they appear in the source. The footnotes will be numbered starting from 1, then 2, etc, depending on the order in which they appear in the text (and not dependent on the label). The footnote reference is a link to the footnote, and from the footnote there is a link back to the reference (or multiple).

There is also optional support for inline footnotes, use builder() and then set FootnotesExtension.Builder.inlineFootnotes.

See Also: