Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Apr 16, 2024
1 parent 0385777 commit f1fcf56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/SIL.Machine/Scripture/ScriptureRangeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private Dictionary<string, List<int>> ParseSection(string section)
Dictionary<string, List<int>> chaptersPerBook = new Dictionary<string, List<int>>();

//*Specific chapters from one book*
if (char.IsDigit(section.Last()))
if (char.IsDigit(section.Last()) && section.Length > 3)
{
string bookName = section.Substring(0, 3);
if (!_bookLengths.ContainsKey(bookName))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public void TestParse(string rangeString, Dictionary<string, List<int>> expected
public static IEnumerable<TestCaseData> GetCases()
{
yield return new TestCaseData("MAL", new Dictionary<string, List<int>> { { "MAL", new List<int>() } }, false);
yield return new TestCaseData("PS2", new Dictionary<string, List<int>> { { "PS2", new List<int>() } }, false);
yield return new TestCaseData(
"GEN,EXO",
new Dictionary<string, List<int>> { { "GEN", new List<int>() }, { "EXO", new List<int>() } },
Expand Down

0 comments on commit f1fcf56

Please sign in to comment.