4c - the label trim, the segment tail, the break run and the guard's spread stop re-walking

This commit is contained in:
2026-09-18 18:04:44 +02:00
parent 538e0ce665
commit 503efa4f82
6 changed files with 60 additions and 15 deletions
+6
View File
@@ -77,3 +77,9 @@ test('accepts the JSON values an attribute may hold', () => {
assert.equal(isAdfDocument({ content: [{ attrs: { a: [1, 'x', null, true, { b: 2 }] }, type: 'paragraph' }], type: 'doc', version: 1 }), true)
assert.equal(isAdfDocument({ content: [{ attrs: { a: [() => 1] }, type: 'paragraph' }], type: 'doc', version: 1 }), false)
})
test("reads a node's siblings as a walk rather than as one call's arguments", () => {
const wide = { content: [{ content: Array.from({ length: 200000 }, () => ({ type: 'rule' })), type: 'blockquote' }], type: 'doc', version: 1 }
assert.equal(isAdfDocument(wide), true)
assert.equal(fault(wide), 'accepted')
})