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
namepicks. 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, andspanrefuses 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
spandoes not resolve: several candidates, or none.firstis 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 sectionextractwould return, so writers can splice it. Headings inside fenced code are not headings.