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 afterextractreturnedNone. - extract
- The section of
planwhose heading matchestask, 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, equalstasktrimmed, or starts withtaskfollowed 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.