Expand description
Reading and writing the Markdown files documents are made of.
Modules§
- body
- Reads the parts of a Markdown body specfold cares about:
[[references]], heading anchors, and paths that cite spec files directly. Fenced code blocks and inline code are skipped, so examples in documentation never count as references. - counts
<!-- spec:count ... -->N<!-- /spec:count -->markers: a number in prose that names where its true value comes from, so a check can compare and a fix can rewrite it.- frontmatter
- YAML frontmatter: split, parse, render.
- link_
dest - Link destinations in a body, the way the import and
mvrewrite them (C180): inline links and images ([t](a.md#x),[t](<a b.md>)) and reference definitions ([r]: a.md "title"), outside fenced and inline code. A percent-encoded destination is matched decoded and written back encoded. - sections
- Extracting one section of a document, so a reader (or an agent) pays only for what it reads.
- tables
- Markdown pipe tables: find a row by the text of its first cell and change it, so an agent can update one line of a status table without rewriting the section.
- tasks
- Task list items (
- [ ]and- [x]), so a plan’s progress can be read without parsing prose.
Structs§
- Fence
- C135: where fenced code starts and ends, the CommonMark way: a fence opens with three or more backticks or tildes and closes only with the same character, at least as many, and nothing else on the line.
Functions§
- atx
- C238: an ATX heading the CommonMark way: at most three spaces of indent (four make code),
one to six
#, then a space, a tab or the end of the line. Gives the level and the text, without a closing run of#.