idk-plans

Parse

module

● 100% (3/3)

Reads one Markdown file into facts: frontmatter, tasks, links, diagrams, and generated blocks. It does not look at other files.

Parse turns one file into the facts that the Model needs. Because it reads one file at a time, a mistake in one file does not stop the others.

How it works

src/parse.js reads the file line by line. It skips code blocks, inline code, and generated blocks, so examples in them are not counted as tasks or links.

It records:

  • The frontmatter, or the YAML error.
  • Each task, with its mark, its state, and its parent task. #blocked on an open task makes the state blocked.
  • Marks that are not task marks, for the unknown-mark check.
  • Each link and reference, with its position, so that fix can rewrite it.
  • Each Mermaid block and the node ids in it. Text on edges is not an id.
  • Each generated block.

Tasks

  • Read the five task marks, and #blocked
  • Ignore tasks and links in code
  • Report marks that are not task marks

Linked from