gatelineAPI reference
interface Section {
    body: string;
    depth: null | 2 | 1;
    heading: null | string;
    headingLine: null | string;
    line: number;
}

Properties

body: string

The section's body, without its heading line.

depth: null | 2 | 1

1 or 2: an H1 (a review's appended round, say) opens a section too, so nothing hides under the previous H2.

heading: null | string

The heading text, or null for whatever precedes the first heading.

headingLine: null | string

The heading line itself, when there is one — rendered by whoever renders the heading.

line: number

The 1-based line of the artifact the section starts on: its heading line, or line 1 for the preamble; a heading's body starts on the next line. It is the numbering every file:line address uses, so a view that renders section by section can still land on a quoted line (#441).