Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hub committed Jan 19, 2025
1 parent b48d5a7 commit 011b9bf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/verse/BaseVerseFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,16 @@ export abstract class BaseVerseFormatter {
}
this.verses.forEach((verse, index) => {
let singleVerseText = verse.text.trim()
if (
index === this.verses!.length - 1 &&
singleVerseText.endsWith('<br/>') // Remove the last <br/> tag that appears in LSB verses.
) {
singleVerseText = singleVerseText.slice(0, -5)
if (index === this.verses!.length - 1 && singleVerseText.endsWith('<br/>')) {
// Remove the last <br/> tag that appears in LSB verses.
singleVerseText = singleVerseText.slice(0, -5)
}
const verseNumberFormatted = this.formatVerseNumber(verse.verse)
if (this.settings?.verseFormatting === BibleVerseFormat.Paragraph) {
text += ' ' + verseNumberFormatted + singleVerseText.replaceAll('\n', ' ')
} else {
text += '> ' + verseNumberFormatted + singleVerseText.replace(/\r\n|\n|\r/g, ' ') + '\n' // Remove extraneous line breaks in KJV verses.
text += '> ' + verseNumberFormatted + singleVerseText.replace(/\r\n|\n|\r/g, ' ') + '\n'
// Remove extraneous line breaks in KJV verses.
}
})
console.debug('text', text)
Expand Down

0 comments on commit 011b9bf

Please sign in to comment.