Skip to main content

Module plan_section

Module plan_section 

Source
Expand description

Extract a task section from a plan file.

Functions§

explain_missing
Explain why a task section was not found in plan, if due to code block fence issues. Used only after extract returned None.
extract
The section of plan whose heading matches task, including the heading line, up to (not including) the next heading of the same or a higher level (fewer or equal #), or the end. A heading matches when its text after the #s, trimmed, equals task trimmed, or starts with task followed by :, -, — or (. Example: task “Task B2” matches “### Task B2: the parser” and “### Task B2”, but not “### Task B20”. Headings inside fenced code blocks (``` or ~~~) are ignored. Returns None if no heading matches; if several match, the first.