From 9910b7e4103a70cac19fbd3510adfa33f8d6ff21 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Fri, 2 Oct 2026 22:28:30 +0000 Subject: [PATCH] check:evangelical-share reads the life grids as SVG: the week and year numbers are text.lc-t, and the reader's words are checked with the tags stripped (the grid's markup names data-weeks as geometry) --- internal/check-evangelical-share.mjs | 6 ++++-- internal/check-packet-variants.mjs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/check-evangelical-share.mjs b/internal/check-evangelical-share.mjs index 4a9285ad3..473264fdf 100644 --- a/internal/check-evangelical-share.mjs +++ b/internal/check-evangelical-share.mjs @@ -90,7 +90,9 @@ const notes = [] if (!partial.includes(`5 ${ppl}`) || !partial.includes(`995 ${ppl}`)) { fails.push(`a 0.5% list of 1,000 people does not state both totals ("5 ${ppl}" who follow Jesus, "995 ${ppl}" who do not yet)`) } else notes.push(' ok both totals are stated in people: 5 who follow Jesus, 995 who do not yet') - if (/week/i.test(partial) || /class="lc-(wk|y)"/.test(partial)) fails.push('the page still counts in weeks or draws a week/year axis') + // The grid is one SVG now (lifeGrid): its week and year numbers are , and its markup names + // `data-weeks` as geometry, so the WORDS a reader sees are read with the tags stripped. + if (/week/i.test(partial.replace(/<[^>]+>/g, ' ')) || /class="lc-t/.test(partial)) fails.push('the page still counts in weeks or draws a week/year axis') else notes.push(' ok no weeks and no week/year axis on the page') // A TINY SHARE: the totals come from the unrounded figure. 0.004% of 1,000,000,000 is 40,000 people, // which must not print as 0 because the percentage rounds to 0.00. @@ -98,7 +100,7 @@ const notes = [] if (!tiny.includes(`40,000 ${ppl}`) || !/ev-pct"><0\.01%[^<]*<\/em><\/span>/.test(full.slice(full.indexOf('class="card"'))), 't const ev = boxes(grid(full, 'sheet-christian')) ok(ev.total === 5200 && ev.on.length === Math.round(0.032 * 5200) && ev.on.every((v, i) => v === i), `the %-evangelical grid should shade 3.2% = ${Math.round(0.032 * 5200)} boxes FROM THE TOP, got ${ev.on.length} of ${ev.total}`) - // THE SAME TABLE: the people grid has the life grid's exact shape (the Driver: the same aspect ratio). + // THE SAME TABLE: the people grid has the life grid's exact shape (one aspect ratio for both pages). const vb = (svg) => (svg.match(/viewBox="([^"]+)"/) || [])[1] ok(vb(grid(full, 'sheet-life')) && vb(grid(full, 'sheet-life')) === vb(grid(full, 'sheet-christian')), 'the people grid should have the life grid\'s exact shape') }