diff --git a/src/markdown/parse/markdown-to-adf.test.ts b/src/markdown/parse/markdown-to-adf.test.ts index 769e7f1..a673768 100644 --- a/src/markdown/parse/markdown-to-adf.test.ts +++ b/src/markdown/parse/markdown-to-adf.test.ts @@ -333,10 +333,10 @@ test('names the CommonMark spelling to write for the directive form a node Commo assert.equal(content(losslessMarkdownToAdf('!adf:blockquote\nPart.\n!adf:/blockquote\n')), named('blockquote', 'each line behind `> `')) assert.equal(content(losslessMarkdownToAdf('!adf:heading {level=2}\nPart.\n!adf:/heading\n')), named('heading', 'one `#` per level before its text, `## Title` at level 2')) assert.equal(content(losslessMarkdownToAdf('!adf:paragraph\nPart.\n!adf:/paragraph\n')), named('paragraph', 'its text alone')) - assert.equal(content(losslessMarkdownToAdf('!adf:bulletList\n!adf:listItem\nPart.\n!adf:/listItem\n!adf:/bulletList\n')), named('bulletList', 'each item behind `- `, or behind `* ` right after another bullet list')) + assert.equal(content(losslessMarkdownToAdf('!adf:bulletList\n!adf:listItem\nPart.\n!adf:/listItem\n!adf:/bulletList\n')), named('bulletList', 'each item behind `- `, or behind `* ` where the list right before it takes `- `')) assert.equal( content(losslessMarkdownToAdf('!adf:orderedList {order=5}\n!adf:listItem\nPart.\n!adf:/listItem\n!adf:/orderedList\n')), - named('orderedList', 'each item behind its number, counting up from `5. `, or from `5) ` right after another ordered list'), + named('orderedList', 'each item behind its number, counting up from `5. `, or from `5) ` where the list right before it takes `.`'), ) assert.equal(content(losslessMarkdownToAdf('!adf:codeBlock\n```\nx\n```\n!adf:/codeBlock\n')), named('codeBlock', 'its text in a fence of more backticks than any run it holds, its language after the opening fence')) assert.equal( diff --git a/src/markdown/parse/markdown-to-adf.ts b/src/markdown/parse/markdown-to-adf.ts index 6add4b6..5e9189f 100644 --- a/src/markdown/parse/markdown-to-adf.ts +++ b/src/markdown/parse/markdown-to-adf.ts @@ -273,13 +273,13 @@ function directiveNode(block: DirectiveBlock, reading: Reading, path: ConvertErr function spellingToWrite(node: AdfNode): string | undefined { if (node.type !== 'orderedList') return commonMarkSpellings.get(node.type) const order = String(nodeAttrs(node)['order']) - return `each item behind its number, counting up from \`${order}. \`, or from \`${order}) \` right after another ordered list` + return `each item behind its number, counting up from \`${order}. \`, or from \`${order}) \` where the list right before it takes \`.\`` } // One entry per node `commonMarkSpelling` spells in the lossless flavour, kept here because this refusal is its only reader; a node missing here is refused naming no spelling. const commonMarkSpellings: ReadonlyMap = new Map([ ['blockquote', 'each line behind `> `'], - ['bulletList', 'each item behind `- `, or behind `* ` right after another bullet list'], + ['bulletList', 'each item behind `- `, or behind `* ` where the list right before it takes `- `'], ['codeBlock', 'its text in a fence of more backticks than any run it holds, its language after the opening fence'], ['heading', 'one `#` per level before its text, `## Title` at level 2'], ['mediaSingle', '`![alt](url)`, or `[![alt](url)](href)` when linked'],