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

Answer stability round 1: 1 🔴, 1 🟡 (0 misread); nested directive contents share their paragraph's memo, and a title after <destination> needs whitespace, pinned

This commit is contained in:
2026-10-28 12:44:27 +01:00
committed by Lillem4n
parent 273c08ac08
commit 935012d475
5 changed files with 49 additions and 26 deletions
@@ -1038,6 +1038,13 @@ test('leaves the bracket pair no link parses as the text it holds', () => {
])
})
test('leaves a link literal whose target runs past the directive content holding it', () => {
assert.deepEqual(firstContent('!adf:underline[[a](b]c)\n'), [marked('[a](b', underline), text('c)')])
assert.deepEqual(firstContent('!adf:underline[[a](<b]>)\n'), [marked('[a](<b', underline), text('>)')])
assert.deepEqual(firstContent('!adf:underline[[a](b "t]")\n'), [marked('[a](b "t', underline), text('")')])
assert.deepEqual(firstContent('!adf:underline[[a](b]) [c](d)\n'), [marked('[a](b', underline), text(') '), marked('c', link('d'))])
})
test('leaves the brackets of a link whose text already holds one the text they are', () => {
const held: AdfMark = { attrs: { collection: 'c', href: '/u' }, type: 'link' }
assert.deepEqual(content(losslessMarkdownToAdf('[<http://x/>](/v)\n')), [