12c - The block directive forms read and spell !adf: openers and closers #86

Merged
lilleman merged 6 commits from 12c into main 2026-09-16 21:48:08 +02:00
Owner

Block directives are spelled and read as !adf:name arg {attrs} openers and !adf:/name closers. Leaf or container follows the node's content model, so a node holding no content whose model takes some is an empty pair; the colon fences and their length rule are gone, and colon lines read back as prose.

A closer names a container open inside its own list item or blockquote, and containers it passes on the way stay unclosed; a leaf given a body is malformed-directive at its opener. The carry fence's info string is carry, and adf is an ordinary language. The block walk matches only list items and blockquotes per line and finds a closer's container by name, so deep directive nesting stays linear.

12b's seams collapse: one carryName, one directiveEscape, spellInlineLeafDirective, spellDirectiveOpener beside its reader, "opener" as the one word, readNestedDirective's reads as named steps, and the charAt fast paths gone.

todo.md 4c gains the list-item walk's re-scan site and readDirectiveContent's split. The README still spells colons until 12d.

Block directives are spelled and read as `!adf:name arg {attrs}` openers and `!adf:/name` closers. Leaf or container follows the node's content model, so a node holding no content whose model takes some is an empty pair; the colon fences and their length rule are gone, and colon lines read back as prose. A closer names a container open inside its own list item or blockquote, and containers it passes on the way stay unclosed; a leaf given a body is `malformed-directive` at its opener. The carry fence's info string is `carry`, and `adf` is an ordinary language. The block walk matches only list items and blockquotes per line and finds a closer's container by name, so deep directive nesting stays linear. 12b's seams collapse: one `carryName`, one `directiveEscape`, `spellInlineLeafDirective`, `spellDirectiveOpener` beside its reader, "opener" as the one word, `readNestedDirective`'s reads as named steps, and the `charAt` fast paths gone. `todo.md` 4c gains the list-item walk's re-scan site and `readDirectiveContent`'s split. The README still spells colons until 12d.
lilleman added 1 commit 2026-09-16 15:47:11 +02:00
12c: the block directive forms read and spell !adf: openers and closers
CI / gate (push) Successful in 26s
CI / publish (push) Has been skipped
5bec3fbbb6
lilleman added 2 commits 2026-09-16 19:21:09 +02:00
lilleman added 1 commit 2026-09-16 19:40:33 +02:00
lilleman added 1 commit 2026-09-16 20:08:50 +02:00
lilleman added 1 commit 2026-09-16 20:23:01 +02:00
lilleman marked the pull request as ready for review 2026-09-16 21:48:03 +02:00
lilleman merged commit 58392ace7c into main 2026-09-16 21:48:08 +02:00
lilleman deleted branch 12c 2026-09-16 21:48:08 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: larvit/adf-codec#86