mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 06:35:44 +01:00
Answer stability round 1: 0 🔴, 1 🟡; pin a link after another mark on the image
This commit is contained in:
@@ -247,6 +247,8 @@ test('keeps both targets of a linked external image standing inline, the image l
|
||||
assert.equal(inCell, '| h |\n| --- |\n| [Moon](https://example.com/docs "Docs") ([image](https://example.com/moon.png)) |\n')
|
||||
const read = portableMarkdownToAdf(inCell)
|
||||
assert.equal(read.ok && portableDocument(read.value), inCell)
|
||||
const bordered: AdfNode = { attrs: { alt: 'Moon', type: 'external', url: 'https://example.com/moon.png' }, marks: [{ attrs: { color: '#000', size: 1 }, type: 'border' }, { attrs: { href: 'https://example.com/docs' }, type: 'link' }], type: 'media' }
|
||||
assert.equal(portable(table(node('mediaSingle', {}, bordered))), '| h |\n| --- |\n| [Moon](https://example.com/docs) ([image](https://example.com/moon.png)) |\n')
|
||||
assert.equal(portable(table(said('See'), node('mediaSingle', {}, linked('https://example.com/docs')))), '| h |\n| --- |\n| See [https://example.com/docs](https://example.com/docs "Docs") ([image](https://example.com/moon.png)) |\n')
|
||||
assert.equal(portable(paragraph(text('See '), linked('https://example.com/moon.png', 'Moon'))), 'See [Moon](https://example.com/moon.png "Docs")\n')
|
||||
assert.equal(portable(paragraph(text('See '), linked('https://example.com/moon.png'))), 'See [https://example.com/moon.png](https://example.com/moon.png "Docs")\n')
|
||||
|
||||
Reference in New Issue
Block a user