Skip to content

Commit

Permalink
Remove extraneous line breaks in KJV verses #187
Browse files Browse the repository at this point in the history
Replace .trim method with .replace to remove extraneous line breaks from KJV verses pulled from BibleAPI.
  • Loading branch information
abbasou authored May 12, 2024
1 parent 10d1dcc commit b9c624c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/verse/BaseVerseFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export abstract class BaseVerseFormatter {
text +=
' ' + verseNumberFormatted + verse.text.trim().replaceAll('\n', ' ')
} else {
text += '> ' + verseNumberFormatted + verse.text.trim() + '\n'
text += '> ' + verseNumberFormatted + verse.text.replace(/\r\n|\n|\r/g, " ") + "\n" // Remove extraneous line breaks in KJV verses.
}
})
console.debug('text', text)
Expand Down

0 comments on commit b9c624c

Please sign in to comment.