footnote method

int? footnote(
  1. String label
)

The number footnote label displays as, or null when it has none.

Footnotes are numbered in the order they are first referenced, as GitHub numbers them, so the text reads ¹ ² ³ whatever order the definitions are written in. A footnote nothing refers to has no number, and is not shown.

Implementation

int? footnote(String label) {
  final lookups = _lookups;
  if (lookups == null && _footnoteDefinitions.isEmpty) {
    return null;
  }
  final key = normalizeLabel(label);
  lookups?.add('f:$key');
  return _footnotes[key];
}