36c - review: a Deno premise that holds today, the plain reduction's memo named
CI / gate (push) Successful in 42s
CI / publish (push) Successful in 6s

This commit was merged in pull request #138.
This commit is contained in:
2026-09-28 11:14:27 +02:00
parent fa6df33987
commit bbfc8724fc
3 changed files with 18 additions and 14 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ type BlockSpelling = 'commonmark' | 'directive' | 'list'
type EmittedBlock = { headroom: number; spelling: BlockSpelling; text: string }
type KeptSpelling = { block: EmittedBlock | undefined; depth: number }
type PlacedBlock = Omit<EmittedBlock, 'headroom'> & { node: AdfNode }
// Keyed by reference: the parse builds one object per position; a consumer's document may share one, so adfToMarkdown passes none.
// Keyed by reference: only a caller building one object per position (the parse, the plain reduction) passes one; a consumer's document may share a node.
export type SpellingMemo = Map<AdfNode, KeptSpelling>
type Walk = { blocks: readonly PlacedBlock[]; headroom: number }
type WalkedItem = { node: AdfNode; walk: Walk }