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

Answer stability round 1: an !adf:link slot reads an image as plain alt text

This commit is contained in:
2026-10-09 03:50:34 +02:00
committed by Lillem4n
parent 029b835e22
commit d97c5c2935
2 changed files with 9 additions and 4 deletions
@@ -1037,6 +1037,9 @@ test('reads an image inside a link not alone in its paragraph as plain alt text
assert.deepEqual(firstContent('See [![a](/u "t")](/v).\n'), [text('See '), marked('a', link('/v')), text('.')])
assert.deepEqual(firstContent('See [![](/u)](/v).\n'), [text('See '), marked('/v', link('/v')), text('.')])
assert.deepEqual(firstContent('[b ![a](/u)](/v)\n'), [marked('b a', link('/v'))])
const unspellable = { attrs: { href: 'a\nb' }, type: 'link' }
assert.deepEqual(firstContent('!adf:link[b ![a](/u)]{href="a\\nb"}\n'), [marked('b a', unspellable)])
assert.deepEqual(firstContent('!adf:link[!adf:underline[![a](/u)]]{href="a\\nb"}\n'), [marked('a', unspellable, { type: 'underline' })])
})
test('carries the mark a spelling nested inside its own kind names once', () => {