Skip to main content

Module sections

Module sections 

Source
Expand description

Extracting one section of a document, so a reader (or an agent) pays only for what it reads.

Functions§

extract
The heading line whose text or anchor matches name (case-insensitive), and everything below it up to the next heading of the same or higher level.
matches
C198: the heading lines name picks. An exact heading text or {#anchor} wins over a heading that only starts with the name; a prefix match counts only when there is no exact one. More than one result means the name is ambiguous, and span refuses it.
names
The section names an error lists when a name is not found: every heading but the H1 title.
not_found
The error for a name span does not resolve: several candidates, or none. first is the file line of the body’s first line, so the lines named are file lines (C226).
outline
Heading outline: (level, text) for every heading.
span
Line range [heading, end) of the section extract would return, so writers can splice it. Headings inside fenced code are not headings.