Study - New Outline stage (hierarchical I./A./1. points, linked to chunks, in all exports); the chunk stage is now "Chunks" - Home cards: passages shown as ranges, tags capped with "+N more" Reader - Side-by-side translations and a Compare tab per verse - Typeface, line spacing, verse-number settings; text and column scale with the screen - Highlights/bookmarks sheet with named colours (synced); BSB footnote spacing fix - Cmd-K palette (passages, studies, notes, marks), keyboard shortcuts and "?" help Flow and safety - Toasts with Undo replace most confirm()/alert() - Back/Forward move between pages - Server refuses saves over a newer copy (409); keep-mine / use-other banner; opening a study no longer re-stamps it - Latest chapter request wins when flipping quickly Offline and data - Save books, plan days or a whole BSB/NET for offline - Service worker fixes: helloao /api/ URLs were skipped and responses cloned too late - Settings: download/restore a full backup Accessibility - Sheets trap focus and close on Escape, skip link, focus ring, reduced motion, theme contrast raised to 4.5:1 (with a test) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
18 lines
904 B
JavaScript
18 lines
904 B
JavaScript
import { expect, test } from 'vitest';
|
||
import { compactPassages } from './passageSummary.js';
|
||
|
||
test('runs of chapters become ranges', () => {
|
||
expect(compactPassages('Luke 1, Luke 2, Luke 3, Luke 4, Luke 5, Luke 6')).toBe('Luke 1–6');
|
||
expect(compactPassages('1 John 1, 1 John 2, 1 John 3, 1 John 4, 1 John 5')).toBe('1 John 1–5');
|
||
});
|
||
test('gaps stay separate, pairs and singles stay plain', () => {
|
||
expect(compactPassages('Luke 1, Luke 2, Luke 3, Luke 5')).toBe('Luke 1–3, 5');
|
||
expect(compactPassages('Malachi 1, Malachi 2')).toBe('Malachi 1, 2');
|
||
expect(compactPassages('John 3')).toBe('John 3');
|
||
});
|
||
test('several books, and text that is not a chapter, are kept', () => {
|
||
expect(compactPassages('Ephesians 1, Ephesians 2, Ephesians 3, Titus 1')).toBe('Ephesians 1–3, Titus 1');
|
||
expect(compactPassages('Whole book')).toBe('Whole book');
|
||
expect(compactPassages('')).toBe('');
|
||
});
|