From 2b6dc5dbb7cc5386808294e5463044a55d6c90ff Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 10 Nov 2026 21:31:31 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1=20(0=20misread);=20import=20Ou?= =?UTF-8?q?termostContent=20in=20the=20test=20and=20drop=20the=20two=20tes?= =?UTF-8?q?ts=20no=20bug=20fails=20on=20alone;=20the=20two=20surviving=20m?= =?UTF-8?q?utants=20sit=20past=20the=20portable=20flavour=20and=20the=20em?= =?UTF-8?q?itter's=20refusals,=20and=20commonmark/=20stays=20out=20of=20th?= =?UTF-8?q?e=20root's=20ban?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/markdown/inline-content.test.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/markdown/inline-content.test.ts b/src/markdown/inline-content.test.ts index ae7a536..892075e 100644 --- a/src/markdown/inline-content.test.ts +++ b/src/markdown/inline-content.test.ts @@ -3,10 +3,10 @@ import test from 'node:test' import type { AdfNode } from '../adf/document.ts' import type { Result } from '../result.ts' -import type { InlineContent } from './inline-content.ts' +import type { InlineContent, OutermostContent } from './inline-content.ts' import { parseInlineContent } from './inline-content.ts' -function read(source: string): Result { +function read(source: string): Result { return parseInlineContent(source, new Map(), [], 'paragraph', 'lossless') } @@ -14,7 +14,7 @@ function nodes(result: Result): AdfNode[] | string { return result.ok ? result.value.nodes : result.error.code } -test('reports a directive link opening the line that CommonMark could spell', () => { +test('reports a directive link that CommonMark could spell opening the line', () => { const opening = read('!adf:link[a]{href="/u"}') assert.equal(opening.ok && opening.value.openingSpellableLink, true) assert.deepEqual(nodes(opening), [{ marks: [{ attrs: { href: '/u' }, type: 'link' }], text: 'a', type: 'text' }]) @@ -24,12 +24,3 @@ test('reports no spellable opening link where the line opens with text', () => { const text = read('See a') assert.equal(text.ok && text.value.openingSpellableLink, false) }) - -test('reports the opening link whose CommonMark spelling would open a link definition, leaving the writer to answer', () => { - const definition = read('!adf:link[`]: a`]{href="/u"}') - assert.equal(definition.ok && definition.value.openingSpellableLink, true) -}) - -test('still refuses a spellable directive link past the opening of the line', () => { - assert.equal(nodes(read('See !adf:link[a]{href="/u"}.')), 'unsupported-node-shape') -})