36c - review: a Deno premise that holds today, the plain reduction's memo named
This commit was merged in pull request #138.
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user