Refuse two adjacent lists on the marker spelling, not the node type
CI / gate (push) Successful in 5s
CI / gate (push) Successful in 5s
This commit is contained in:
@@ -59,7 +59,7 @@ export function parseBlocks(markdown: string): ParsedBlocks {
|
||||
|
||||
function readLine(walk: Walk, line: Line): void {
|
||||
const matched = matchContainers(walk, line)
|
||||
// A leaf that swallows whole lines takes the marker too: no container opens inside a code or HTML block.
|
||||
// CommonMark: no container opens inside an open code or HTML block.
|
||||
if (matched.depth === walk.stack.length && swallowsLines(walk.leaf)) {
|
||||
readBlockLine(walk, matched.rest)
|
||||
return
|
||||
|
||||
@@ -199,6 +199,7 @@ test('measures a tab from the column the containers cut it to', () => {
|
||||
test('drops the tightness ADF does not record', () => {
|
||||
assert.deepEqual(content(markdownToAdf('- a\n\n- b\n')), [bulletList(item(paragraph('a')), item(paragraph('b')))])
|
||||
assert.deepEqual(content(markdownToAdf('- a\n\n 2. b\n')), [bulletList(item(paragraph('a'), orderedList(2, item(paragraph('b')))))])
|
||||
assert.deepEqual(content(markdownToAdf('- a\n\n -\n')), [bulletList(item(paragraph('a'), bulletList(item())))])
|
||||
})
|
||||
|
||||
test('opens a list beside a paragraph only where the marker interrupts it', () => {
|
||||
|
||||
Reference in New Issue
Block a user