Drop verse-number prefixes from scripture-sourced Matins readings
Deploy / deploy (push) Successful in 1m47s
Deploy / deploy (push) Successful in 1m47s
resolvePassages() prepended each verse's number ("1 Et factum est...")
when joining scripture verses into continuous reading text — visible
today in Job's Matins reading. Not wanted; join the verse text alone.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Je2mXNHoXmi1DS3xEL67rH
This commit is contained in:
@@ -70,11 +70,11 @@ export function resolvePassages(passages: ScriptureCitation[]): Partial<Record<L
|
|||||||
for (const citation of passages) {
|
for (const citation of passages) {
|
||||||
const verses = getScriptureVerses(citation.book, citation.chapter, citation.verses);
|
const verses = getScriptureVerses(citation.book, citation.chapter, citation.verses);
|
||||||
const la = verses
|
const la = verses
|
||||||
.map((v) => (v.text.la ? `${v.n} ${v.text.la}` : undefined))
|
.map((v) => v.text.la)
|
||||||
.filter((s): s is string => !!s)
|
.filter((s): s is string => !!s)
|
||||||
.join(' ');
|
.join(' ');
|
||||||
const en = verses
|
const en = verses
|
||||||
.map((v) => (v.text.en ? `${v.n} ${v.text.en}` : undefined))
|
.map((v) => v.text.en)
|
||||||
.filter((s): s is string => !!s)
|
.filter((s): s is string => !!s)
|
||||||
.join(' ');
|
.join(' ');
|
||||||
if (la) laParagraphs.push(la);
|
if (la) laParagraphs.push(la);
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ describe('getOctaveReading', () => {
|
|||||||
const reading = getOctaveReading('all-saints', 2);
|
const reading = getOctaveReading('all-saints', 2);
|
||||||
const paragraphs = reading?.text.la?.split('\n\n') ?? [];
|
const paragraphs = reading?.text.la?.split('\n\n') ?? [];
|
||||||
expect(paragraphs.length).toBe(3);
|
expect(paragraphs.length).toBe(3);
|
||||||
expect(paragraphs[0]).toContain('1 Et factum est');
|
expect(paragraphs[0]).toContain('Et factum est');
|
||||||
expect(reading?.text.en).toContain('1 Now it came to pass');
|
expect(reading?.text.en).toContain('Now it came to pass');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('resolves a scripture passage reading that spans two chapters', () => {
|
it('resolves a scripture passage reading that spans two chapters', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user