Dynamic child resolvers returned Some for any name, fabricating phantom document and section directories so walks to nonexistent paths appeared to succeed. Validate existence and return None instead: - root resolver checks get_doc - document resolver checks new OrkState::section_exists - section resolver checks child_ids Also fix create_child_section, which corrupted the org file: - find_section_end used the parent's headline-end offset, inserting the child before the parent's PROPERTIES/ID drawer and detaching its ID. Use section.span.end, which covers planning, drawer, body, children. - The child headline was written verbatim; demote it to parent.level + 1 via the new restar helper. Add regression tests for restar and child section nesting. |
||
|---|---|---|
| .. | ||
| org-ast | ||
| org-parser | ||
| ork-cli | ||
| ork-server | ||
| orkmode-core | ||