From ac1cbaad2791f4dbbb762fbf179692fb3fcf0f19 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 4 Nov 2026 16:44:10 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1=20(0=20misread);=20pin=20a=20c?= =?UTF-8?q?ard=20whose=20URL=20cannot=20be=20written=20and=20a=20non-strin?= =?UTF-8?q?g=20url=20or=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/html/emit/adf-to-html.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/html/emit/adf-to-html.test.ts b/src/html/emit/adf-to-html.test.ts index e922e86..1c9bbe0 100644 --- a/src/html/emit/adf-to-html.test.ts +++ b/src/html/emit/adf-to-html.test.ts @@ -153,7 +153,7 @@ test('writes an emoji, mention, status, date and card as their elements, their a assert.equal(inline({ attrs: { data: { url: 'https://example.com/plan' } }, type: 'inlineCard' }), '

See https://example.com/plan

\n') }) -test('carries a node its element cannot hold', () => { +test('carries an emoji, mention, status, date or card holding what its element cannot write', () => { const carried = (node: AdfNode): boolean => html(adfToHtml(document(paragraph(node)))).includes('adf-carry') const comment: AdfMark = { attrs: { annotationType: 'inlineComment', id: 'c1' }, type: 'annotation' } assert.equal(carried({ attrs: { text: '🎉' }, marks: [comment], type: 'emoji' }), true) @@ -177,6 +177,8 @@ test('carries a node its element cannot hold', () => { assert.equal(carried({ attrs: { url: 'https://example.com/\u0001' }, type: 'inlineCard' }), true) assert.equal(carried({ attrs: { data: { name: 'Roadmap', url: 'https://example.com/' } }, marks: [comment], type: 'inlineCard' }), true) assert.equal(carried({ attrs: { data: { url: 'https://example.com/\u0001' } }, type: 'inlineCard' }), true) + assert.equal(carried({ attrs: { data: { name: 'Roadmap', url: 'https://example.com/\u0001' } }, type: 'inlineCard' }), true) + assert.equal(carried({ attrs: { url: 7 }, type: 'inlineCard' }), true) assert.equal(carried({ attrs: { data: { name: 'Roadmap', url: ' ' } }, type: 'inlineCard' }), true) assert.equal(carried({ attrs: { data: 'https://example.com/' }, type: 'inlineCard' }), true) assert.equal(carried({ attrs: { data: {} }, type: 'inlineCard' }), true) @@ -186,6 +188,7 @@ test('carries a node its element cannot hold', () => { assert.equal(carried({ attrs: { id: '5b10a2', text: '@Mikael' }, content: [text('x')], type: 'mention' }), true) assert.equal(carried({ attrs: { id: '5b10a2', text: '@Mikael' }, marks: [comment], type: 'mention' }), true) assert.equal(carried({ attrs: { id: 7, text: '@Mikael' }, type: 'mention' }), true) + assert.equal(carried({ attrs: { id: '5b10a2', text: 7 }, type: 'mention' }), true) }) test('shows each block a carried node holds as a paragraph in a div', () => {