27 - a placed block carries no headroom, so the list's directive items write none #126
@@ -296,11 +296,10 @@ someone spells it or pins it.
|
|||||||
attribute's and a carried node's alike — are all held to 500 levels (`largestNesting`), so a
|
attribute's and a carried node's alike — are all held to 500 levels (`largestNesting`), so a
|
||||||
deep document is a `Result` rather than the stack overflow that waits near 2000. An attribute
|
deep document is a `Result` rather than the stack overflow that waits near 2000. An attribute
|
||||||
is counted from its value; a spelling that nests it deeper — the block directive's `marks`, the
|
is counted from its value; a spelling that nests it deeper — the block directive's `marks`, the
|
||||||
carry — refuses in its own format, as its parser does. A list giving way after its walk owes
|
carry — refuses in its own format, as its parser does. A list giving way to the directive form
|
||||||
the directive form a level the walk did not count, and the walk reports its headroom — the
|
refuses at zero headroom rather than walking again; counting every list twice halved the list
|
||||||
least slack any depth guard below it has — for the fallback to refuse at zero rather than walk
|
limit, counting the directive form once doubled the parser's frames per level (the maintainer,
|
||||||
again; counting every list twice halved the list limit, counting the directive form once
|
2026-09-18).
|
||||||
doubled the parser's frames per level (the maintainer, 2026-09-18).
|
|
||||||
- Nothing spreads an unbounded array into a call — a node's siblings, a code block's held lines, a
|
- Nothing spreads an unbounded array into a call — a node's siblings, a code block's held lines, a
|
||||||
mark run's segments: the argument list caps near 125k and throws a `RangeError` where a `Result`
|
mark run's segments: the argument list caps near 125k and throws a `RangeError` where a `Result`
|
||||||
is owed. A walk pushes one at a time. A literal spread (`[...value]`) is not the same thing and
|
is owed. A walk pushes one at a time. A literal spread (`[...value]`) is not the same thing and
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ function tryList(node: AdfNode, path: ConvertErrorPath, depth: number, memo: Spe
|
|||||||
for (const [offset, item] of walked.entries()) {
|
for (const [offset, item] of walked.entries()) {
|
||||||
const line = tryListItemLines(item.walk.blocks, ordered ? `${start + offset}. ` : '- ')
|
const line = tryListItemLines(item.walk.blocks, ordered ? `${start + offset}. ` : '- ')
|
||||||
if (line === undefined) {
|
if (line === undefined) {
|
||||||
|
// The directive form spends a level the walk did not count.
|
||||||
if (headroom < 1) return tooDeep(path)
|
if (headroom < 1) return tooDeep(path)
|
||||||
return emitDirectiveBlock(node, ordered ? blockNodes.orderedList : blockNodes.bulletList, path, depth, () => success({ blocks: directiveItems(walked), headroom: headroom - 1 }))
|
return emitDirectiveBlock(node, ordered ? blockNodes.orderedList : blockNodes.bulletList, path, depth, () => success({ blocks: directiveItems(walked), headroom: headroom - 1 }))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user