FootnoteDefinition

import { FootnoteDefinition } from "jsr:@ende/markdown";

interface

interface FootnoteDefinition

A footnote definition, such as [^1]: The note.. Only parsed with the gfm option. The definition stays where it was written; render() moves the definitions that are referenced into a footnotes section at the end.

Example: Usage

import type { FootnoteDefinition } from "@ende/markdown/types";
import { assertEquals } from "@ende/assert";

const node: FootnoteDefinition = {
  type: "footnoteDefinition",
  identifier: "1",
  label: "1",
  children: [{ type: "paragraph", children: [{ type: "text", value: "The note." }] }]
};
assertEquals(node.label, "1");

Properties

type

type: "footnoteDefinition"

Node type.

identifier

identifier: string

The normalized label (case-folded, with whitespace collapsed).

label

label: string

The label as written in the source, without [^ and ]:.

children

children: (BlockContent | DefinitionContent)[]

The blocks in the definition.

Source