Fix text encoding issues in NKJV files by removing UTF-8 BOM in readMarkdownFile

This commit is contained in:
Ryderjj89
2025-09-28 12:53:28 -04:00
parent 9e16b10222
commit 4721e8b5a5
1191 changed files with 6 additions and 4 deletions

View File

@@ -166,8 +166,9 @@ function App() {
// Helper function to format book names for display
const formatBookName = (bookName: string): string => {
// Remove leading numbers and underscores, replace underscores with spaces
return bookName.replace(/^\d+_/, '').replace(/_/g, ' ');
// Handle both formats: numbered (01_Genesis) and regular (Genesis)
const cleanName = bookName.replace(/^\d+_/, ''); // Remove leading number and underscore
return cleanName.replace(/_/g, ' '); // Replace underscores with spaces
};
// Helper function to convert display name back to file name