Update verse parsing regex to support both '1.' and '1 ' formats for verse numbering
This commit is contained in:
@@ -241,8 +241,8 @@ const BibleReader: React.FC<BibleReaderProps> = ({ book, chapter, onBack, format
|
|||||||
// Skip empty lines
|
// Skip empty lines
|
||||||
if (!line) continue;
|
if (!line) continue;
|
||||||
|
|
||||||
// Check if line is a numbered verse (e.g., "1. ", "2. ", etc.)
|
// Check if line is a numbered verse (e.g., "1. ", "2. ", "1 ", "2 ", etc.)
|
||||||
const verseMatch = line.match(/^(\d+)\.\s+(.+)$/);
|
const verseMatch = line.match(/^(\d+)[\.\s]\s+(.+)$/);
|
||||||
if (verseMatch) {
|
if (verseMatch) {
|
||||||
const verseNumber = verseMatch[1];
|
const verseNumber = verseMatch[1];
|
||||||
const verseText = verseMatch[2];
|
const verseText = verseMatch[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user