From b5dc392ca4317679ac8071b3a9a9e193e5d5c611 Mon Sep 17 00:00:00 2001 From: Art Pai Date: Fri, 11 Sep 2026 22:12:05 +1000 Subject: [PATCH] Number review section titles beside the review map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A section title carried no index, so a reader could not match the content being read with its entry in the review map. Both the title and the map now render the same zero-padded index from one shared sequence, and the title and explanation prose scale to 18px and 17px. Co-Authored-By: ことね --- src/report/shell.ts | 15 +++++--- test/report.test.ts | 86 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 5 deletions(-) diff --git a/src/report/shell.ts b/src/report/shell.ts index a0434ff..7fd021b 100644 --- a/src/report/shell.ts +++ b/src/report/shell.ts @@ -197,7 +197,7 @@ function renderSection( const markup = `
- ${escapeHtml(section.title)}${renderCopyLink(target.fragment, `Copy link to section ${section.title}`)} + ${sectionIndex(index)}${escapeHtml(section.title)}${renderCopyLink(target.fragment, `Copy link to section ${section.title}`)} ${steps.join('\n')}
` @@ -212,7 +212,7 @@ function renderReviewMap( const links = sections .map( (section, index) => - `
  • ${String(index + 1).padStart(2, '0')}${escapeHtml(section.title)}
  • `, + `
  • ${sectionIndex(index)}${escapeHtml(section.title)}
  • `, ) .join('\n') return `