NanoFile

Markdown footnotes

A footnote is a marker in the text and a definition somewhere else in the file. The renderer collects the definitions, numbers them and puts them at the bottom with links back.

A footnote
Markdown was designed in 2004.[^1]

[^1]: By John Gruber, with Aaron Swartz on the syntax.

Markdown was designed in 2004.1

Footnotes

  1. By John Gruber, with Aaron Swartz on the syntax.

Named, and with several paragraphs
Nothing is uploaded.[^privacy]

[^privacy]:
    The parser runs in the browser.

    Indent continuation lines by four spaces.

Nothing is uploaded.1

Footnotes

  1. The parser runs in the browser.

    Indent continuation lines by four spaces.

What usually goes wrong

  • Not part of CommonMark. GitHub, Obsidian and most static site generators support footnotes; chat apps and simple renderers show the brackets as text.
  • The label is an identifier, not the number. Renderers number footnotes in the order they appear in the text, so [^1] can come out as 3.
  • A definition with no matching marker renders nowhere, silently.

Related