3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 14:45:44 +01:00

Pin the link mark's two error codes, and correct what the unspellable corpus holds

This commit is contained in:
2026-08-26 23:04:41 +02:00
parent 2e4d9c4143
commit 2015c9813f
2 changed files with 8 additions and 3 deletions
+2
View File
@@ -90,6 +90,8 @@ test('refuses a link attribute no markdown spelling holds', () => {
code(adfToMarkdown(document(paragraph({ marks: [{ attrs: { href: 'https://example.com/', id: 'x' }, type: 'link' }], text: 't', type: 'text' })))),
'unspellable-mark',
)
assert.equal(code(adfToMarkdown(document(paragraph({ marks: [{ attrs: { href: 4 }, type: 'link' }], text: 't', type: 'text' })))), 'unspellable-mark')
assert.equal(code(adfToMarkdown(document(paragraph({ marks: [{ type: 'link' }], text: 't', type: 'text' })))), 'unsupported-node-shape')
})
test('refuses a mark the canonical spellings cannot nest', () => {