Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes https://github.com/sillsdev/serval/issues/365 #187

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading