Refuse two adjacent lists on the marker spelling, not the node type
CI / gate (push) Successful in 5s

This commit is contained in:
2026-08-30 20:48:04 +02:00
parent 99581c8f60
commit 7fc0cdb827
6 changed files with 13 additions and 10 deletions
+4 -1
View File
@@ -130,9 +130,12 @@ test('refuses a line whose start block parsing would claim', () => {
assert.equal(code(adfToMarkdown(document(paragraph({ marks: [{ type: 'code' }], text: '```', type: 'text' })))), 'unspellable-line-start')
})
test('refuses two adjacent lists of the same kind', () => {
test('refuses two adjacent lists of the same kind, the marker spelling being what merges', () => {
const list: AdfNode = { content: [{ content: [paragraph({ text: 'x', type: 'text' })], type: 'listItem' }], type: 'bulletList' }
assert.equal(code(adfToMarkdown(document(list, list))), 'unspellable-adjacent-lists')
const carried: AdfNode = { ...list, attrs: { unknown: 'x' } }
assert.ok(markdown(adfToMarkdown(document(carried, carried))).startsWith('```adf\n'))
assert.ok(markdown(adfToMarkdown(document(carried, list))).endsWith('```\n\n- x\n'))
})
test('carries a node type no section spells', () => {