mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 06:35:44 +01:00
Answer architecture round 6: each block is held to the bound as it is built, the reader's ask takes the engine guard, and the chunk ships under a worse comprehension ruling by the maintainer's call, with item 110 to fill the memo in one place
This commit is contained in:
@@ -262,9 +262,10 @@ function directiveNode(block: DirectiveBlock, reading: Reading, path: ConvertErr
|
||||
if (!read.ok) return read
|
||||
const built = directiveBody(read.value, block.blocks, reading, path, depth)
|
||||
if (!built.ok) return built
|
||||
const readable = commonMarkSpelling(built.value, path, depth, { flavour: 'lossless', memo: reading.memo })
|
||||
if (readable === undefined) return built
|
||||
// Guarded here, so V8's throw past the bound refuses at the directive as another engine's check does.
|
||||
const readable = withinEngineLimits<null | undefined>(() => commonMarkSpelling(built.value, path, depth, { flavour: 'lossless', memo: reading.memo }) ?? success(undefined))
|
||||
if (!readable.ok) return readable
|
||||
if (readable.value === undefined) return built
|
||||
return failure('unsupported-node-shape', `${built.value.type} takes the CommonMark spelling, not the directive form`, path)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user