Update verse parsing regex to support both '1.' and '1 ' formats for verse numbering

This commit is contained in:
Ryderjj89
2025-09-29 16:29:10 -04:00
parent 1cf7045213
commit cfc20dd296

View File

@@ -241,8 +241,8 @@ const BibleReader: React.FC<BibleReaderProps> = ({ book, chapter, onBack, format
// Skip empty lines
if (!line) continue;
// Check if line is a numbered verse (e.g., "1. ", "2. ", etc.)
const verseMatch = line.match(/^(\d+)\.\s+(.+)$/);
// Check if line is a numbered verse (e.g., "1. ", "2. ", "1 ", "2 ", etc.)
const verseMatch = line.match(/^(\d+)[\.\s]\s+(.+)$/);
if (verseMatch) {
const verseNumber = verseMatch[1];
const verseText = verseMatch[2];