From ff44b6e195769330b7da87cfd0789719add86c38 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 28 Oct 2026 18:12:48 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20principles=20round=203:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20item=20154?= =?UTF-8?q?=20says=20what=20the=20pairing=20reads=20off=20the=20built=20no?= =?UTF-8?q?des,=20and=20the=20fallback=20test=20spells=20its=20runs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/markdown/portable/adf-to-portable-markdown.test.ts | 2 +- todo.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/markdown/portable/adf-to-portable-markdown.test.ts b/src/markdown/portable/adf-to-portable-markdown.test.ts index 844402f..8ca648e 100644 --- a/src/markdown/portable/adf-to-portable-markdown.test.ts +++ b/src/markdown/portable/adf-to-portable-markdown.test.ts @@ -397,7 +397,7 @@ test('drops the mark of the run that cannot close where it sits, and keeps the l test('gives up every highlight run whose own delimiter cannot flank in one fallback, so a line of them re-emits once however many it holds', () => { const highlight: AdfMark = { type: 'backgroundColor' } const line = [text('a '), text('x', highlight), text('a '), text('x', highlight), text('a '), text('x', highlight), text('a')] - const runs = [1, 3, 5].map((index) => ({ depth: 0, first: index, last: index })) + const runs = [{ depth: 0, first: 1, last: 1 }, { depth: 0, first: 3, last: 3 }, { depth: 0, first: 5, last: 5 }] assert.deepEqual(portableLineFallback(line, 'paragraph', []), { ok: true, value: { kind: 'unspellable-run', runs } }) }) diff --git a/todo.md b/todo.md index c03bdc6..2016215 100644 --- a/todo.md +++ b/todo.md @@ -218,8 +218,8 @@ and hostile. Technical principle: for pure logic over many inputs, prefer a prop A comprehension seat found `src/markdown/inline-content.ts` `resolveNodes` / `pairedHighlights` hard: an empty text node stands in for each `==` until pairing, then a cursor walk overwrites it. -The pieces now carry their offsets, so the pairing can run on them first. Make that place easier to -read. +The pairing reads each `==`'s position, stretch and marks off the built nodes; give the pieces what +it reads, so it can run on them first. Make that place easier to read. ### 155. Have `closeBracket` return the link, image or literal bracket it builds, and apply it to the scan in one caller.