3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 23:25:43 +01:00

Answer prose round 1: the refusal messages name what passed the bound, the decisions read one idea a sentence, and the changelog gives the readers' fix its own bullet

This commit is contained in:
2026-10-13 01:17:36 +02:00
committed by Lillem4n
parent 142ed310c2
commit 7bc69355c3
11 changed files with 60 additions and 59 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ function walkBlocks(nodes: readonly AdfNode[], path: ConvertErrorPath, depth: nu
for (const [index, node] of nodes.entries()) {
const block = emitBlock(node, [...path, 'content', index], depth, writing)
if (!block.ok) return block
// V8 throws building a block past the bound; an engine holding longer strings stops at the same block.
// Refused here, so an engine holding longer strings stops at the block where V8 throws.
const fits = withinLongest(block.value.text)
if (!fits.ok) return fits
headroom = Math.min(headroom, block.value.headroom)
@@ -136,7 +136,7 @@ function readableBlock(node: AdfNode, path: ConvertErrorPath, depth: number, wri
return spellReadableBlock(node, path, depth, writing)
}
// The CommonMark ask fills an entry; the walk above reads it once and spells it into its own text, so kept, every level of a deep subtree would hold its whole text.
// docs/decisions.md §The spelling memo
function takeKeptSpelling(memo: SpellingMemo | undefined, node: AdfNode): KeptSpelling | undefined {
const kept = memo?.get(node)
memo?.delete(node)