diff --git a/src/SIL.Machine/Corpora/ScriptureRefUsfmParserHandlerBase.cs b/src/SIL.Machine/Corpora/ScriptureRefUsfmParserHandlerBase.cs index da66b34f..68294c7b 100644 --- a/src/SIL.Machine/Corpora/ScriptureRefUsfmParserHandlerBase.cs +++ b/src/SIL.Machine/Corpora/ScriptureRefUsfmParserHandlerBase.cs @@ -241,6 +241,7 @@ private void UpdateVerseRef(VerseRef verseRef, string marker) { _curElements.Clear(); _curElements.Push(new ScriptureElement(0, marker)); + _curTextType.Clear(); } _curVerseRef = verseRef; } diff --git a/tests/SIL.Machine.Tests/Corpora/UsfmMemoryTextTests.cs b/tests/SIL.Machine.Tests/Corpora/UsfmMemoryTextTests.cs index b08c0d10..988d29da 100644 --- a/tests/SIL.Machine.Tests/Corpora/UsfmMemoryTextTests.cs +++ b/tests/SIL.Machine.Tests/Corpora/UsfmMemoryTextTests.cs @@ -87,7 +87,7 @@ public void GetRows_multichapter_nonverse() includeAllText: true ); - Assert.That(rows, Has.Length.EqualTo(5)); + Assert.That(rows, Has.Length.EqualTo(3)); } private static TextRow[] GetRows(string usfm, bool includeMarkers = false, bool includeAllText = false)