4c - the guard's spread was a class: the code block's held lines and a mark run's segments too
This commit is contained in:
@@ -118,3 +118,7 @@ test('closes the containers a closer names past as unclosed, and crosses no list
|
||||
assert.deepEqual(kinds('!adf:rule {localId=a-1}\nPart.\n!adf:/rule\n'), ['fault', 'paragraph'])
|
||||
assert.deepEqual(kinds('!adf:rule {localId=a-1}\n!adf:/rule\n!adf:/rule\n'), ['fault', 'fault'])
|
||||
})
|
||||
|
||||
test("releases an indented code block's held blank lines as a walk rather than as one call's arguments", () => {
|
||||
assert.deepEqual(kinds(` a\n${'\n'.repeat(200000)} b\n`), ['code'])
|
||||
})
|
||||
|
||||
@@ -365,7 +365,8 @@ function readIndentedCodeLine(leaf: Extract<OpenLeaf, { kind: 'indented-code' }>
|
||||
return true
|
||||
}
|
||||
if (leadingColumns(line) < indentedCodeColumns) return false
|
||||
leaf.lines.push(...leaf.held, removeColumns(line, indentedCodeColumns).text)
|
||||
for (const held of leaf.held) leaf.lines.push(held)
|
||||
leaf.lines.push(removeColumns(line, indentedCodeColumns).text)
|
||||
leaf.held.length = 0
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user