Documentation
    Preparing search index...

    Interface Document

    Top-level AST element, which represents a parsed Djot document.

    interface Document {
        attributes?: Attributes;
        autoAttributes?: Attributes;
        autoReferences: Record<string, Reference>;
        children: Block[];
        data?: Data;
        footnotes: Record<string, Footnote>;
        position?: Position;
        references: Record<string, Reference>;
        type: "document";
    }

    Hierarchy (View Summary)

    Index

    Properties

    attributes?: Attributes

    Manually defined attributes. #<id> definitions will be converted to an id attribute and all .<class> declarations will be turned into one class attribute whose value is a string of space-delimited declaration identifiers (so, {.a .b} will turn into "class": "a b").

    autoAttributes?: Attributes

    Attributes added by the djot.js parser. This includes automatic ids on Section elements and a few others.

    autoReferences: Record<string, Reference>
    children: Block[]

    List of children.

    data?: Data

    Info from the ecosystem.

    footnotes: Record<string, Footnote>

    A map of footnotes with keys appearing in the same order the references go in the document body.

    position?: Position

    Position of a node in a source document.

    Nodes that are generated (not in the original source document) must not have a position.

    references: Record<string, Reference>
    type: "document"

    Node type.