From efa7c4a95fc923d6f821a24c7c36f8648a1acb53 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 15 Nov 2026 21:40:03 +0100 Subject: [PATCH] Pin a leaf whose two edges reach a line edge in different rounds, killing the edge-count mutants --- src/markdown/portable/inline-reduction.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/markdown/portable/inline-reduction.test.ts b/src/markdown/portable/inline-reduction.test.ts index a9b0889..9e41453 100644 --- a/src/markdown/portable/inline-reduction.test.ts +++ b/src/markdown/portable/inline-reduction.test.ts @@ -142,6 +142,8 @@ const replayedLines: readonly [string, AdfNode[], AdfNode[]][] = [ ['the lead whitespace a dropped blank leaves at the line start', [marked(' ', em), marked(' x')], [{ text: 'x', type: 'text' }]], ['the trail whitespace dropped blanks leave before a hard break', [marked('x ', link), marked(' ', em, link), marked(' ', link), marked(' ', em, link), { type: 'hardBreak' }, marked('y', link)], [marked('x', link), { type: 'hardBreak' }, marked('y', link)]], ['the lead whitespace dropped blanks leave after a hard break', [marked('y', link), { type: 'hardBreak' }, marked(' ', em, link), marked(' ', link), marked(' ', em, link), marked(' x', link)], [marked('y', link), { type: 'hardBreak' }, marked('x', link)]], + ['both edges of a leaf whose lead whitespace reaches a line edge two rounds before its trail whitespace', [marked('y', link), { type: 'hardBreak' }, marked(' ', link), { text: ' x ', type: 'text' }, marked(' ', link), { text: ' ', type: 'text' }, marked(' ', link), { type: 'hardBreak' }, marked('y', link)], [marked('y', link), { type: 'hardBreak' }, { text: 'x', type: 'text' }, { type: 'hardBreak' }, marked('y', link)]], + ['both edges of a leaf whose trail whitespace reaches a line edge two rounds before its lead whitespace', [marked('y', link), { type: 'hardBreak' }, marked(' ', link), { text: ' ', type: 'text' }, marked(' ', link), { text: ' x ', type: 'text' }, marked(' ', link), { type: 'hardBreak' }, marked('y', link)], [marked('y', link), { type: 'hardBreak' }, { text: 'x', type: 'text' }, { type: 'hardBreak' }, marked('y', link)]], ] for (const [name, line, trimmed] of replayedLines) { test(`trims ${name} in 2 passes`, () => {