Skip to content

Commit 9fa4efb

Browse files
committed
Sort by verse ref not scripture ref; add error handler in tests
1 parent d245c27 commit 9fa4efb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/SIL.Machine/Corpora/UpdateUsfmParserHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public UpdateUsfmParserHandler(
8484
_rows = _rows
8585
.Where(r => r.Refs.Count > 0)
8686
.OrderBy(
87-
r => r.Refs[0],
88-
compareSegments ? ScriptureRefComparer.Default : ScriptureRefComparer.IgnoreSegments
87+
r => r.Refs[0].VerseRef,
88+
compareSegments ? VerseRefComparer.Default : VerseRefComparer.IgnoreSegments
8989
)
9090
.ToArray();
9191
_verseRows = new List<int>();

tests/SIL.Machine.Tests/Corpora/UpdateUsfmParserHandlerTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,7 @@ private static string UpdateUsfm(
13961396
preserveParagraphStyles,
13971397
usfmUpdateBlockHandlers,
13981398
remarks,
1399+
(_) => false,
13991400
compareSegments
14001401
);
14011402
}
@@ -1412,6 +1413,7 @@ private static string UpdateUsfm(
14121413
preserveParagraphStyles,
14131414
usfmUpdateBlockHandlers,
14141415
remarks,
1416+
(_) => false,
14151417
compareSegments
14161418
);
14171419
UsfmParser.Parse(source, updater);

0 commit comments

Comments
 (0)