Skip to content

Commit

Permalink
Fix for verses succeeding combined verses (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmachapman authored Feb 17, 2024
1 parent ef521ed commit 6fae39d
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions GoToBible.Providers/DigitalBiblePlatformApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,26 +257,17 @@ await this.Cache.SetStringAsync(
{
foreach (var verse in chapterJson.data)
{
string verseText = verse
.verse_text.Trim()
.Replace("\n", " ")
.RemoveDuplicateSpaces();
sb.Append(verse.verse_start);

// Allow multi-verse lines, i.e. "1-2 In the beginning"
if (verse.verse_start != verse.verse_end)
{
sb.Append(verse.verse_start);
sb.Append('-');
sb.Append(verse.verse_end);
sb.Append(" ");
sb.Append(verseText);
}
else
{
sb.Append(verse.verse_start);
sb.Append(" ");
sb.AppendLine(verseText);
}

sb.Append(" ");
sb.AppendLine(verse.verse_text.Trim().Replace("\n", " ").RemoveDuplicateSpaces());
}
}

Expand Down

0 comments on commit 6fae39d

Please sign in to comment.