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

Answer architecture round 3: the forecast never overcounts, the carry's JSON and the portable code block join through joinedWithin, and the list's choice of form stands in its own function

This commit is contained in:
2026-10-12 17:52:15 +02:00
committed by Lillem4n
parent 3414c8690a
commit ae1a47f1bc
14 changed files with 83 additions and 84 deletions
@@ -82,6 +82,11 @@ test('refuses an expand whose title and body together would pass V8\'s longest s
assert.equal(portableDocument(document(quote)), 'unsupported-node-shape at /')
})
test('refuses a code block whose text nodes together would pass V8\'s longest string, joining none of them', () => {
const long = text('a'.repeat(2 ** 28))
assert.equal(portableDocument(document({ content: [long, long, long], type: 'codeBlock' })), 'unsupported-node-shape at /')
})
test('refuses nesting past 500 levels wherever the reduction walks', () => {
const lowest = (bottom: AdfNode): string => {
let deep = bottom