Skip to main content

Module body

Module body 

Source
Expand description

Parsing of the markdown body: title, sections, and checklist items.

Structs§

ChecklistItem

Functions§

apply_section_edits
Splice new_text into sections addressed by index (from section_spans), replacing each section’s trimmed content while preserving the heading line and the surrounding blank lines byte-for-byte. Edits apply back-to-front so byte offsets stay valid across multiple edits to one body.
checklist_items
Top-level checkbox items under the named ## <header> section. Used for a feature’s ## Test plan and a work item’s ## Tasks.
has_section
Whether the body contains a ## <header> section heading.
section
Text of the ## <header> section, up to the next ## heading (or EOF).
section_spans
The byte range of each ## section’s content (the text under the heading, up to the next ## ), paired with its heading, in document order — the preamble (empty heading) first unless it is blank. The blocks projection’s seq indexes into this, so it is the addressing scheme for section edits.
sections
Split the body into ## sections in document order as (heading, content) pairs — content is the text under each heading up to the next ## . The first pair has an empty heading and holds the preamble (title + intro) before the first ## . Follows section’s ## -delimited convention.
title
First # Heading line, or "".