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.
#blockedon an open task makes the stateblocked. - Marks that are not task marks, for the
unknown-markcheck. - Each link and reference, with its position, so that
fixcan 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