File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/SIL.XForge.Scripture/Services Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ private static bool CanParaContainVerseText(string? style)
177
177
178
178
public static string ExtractBookId ( string usfm )
179
179
{
180
- string firstLine = usfm . Split ( ' \n ' ) . FirstOrDefault ( ) ? . Trim ( ) ?? string . Empty ;
181
- return BookIdRegex ( ) . Match ( firstLine ) . Groups [ 1 ] . Value ;
180
+ Match match = BookIdRegex ( ) . Match ( usfm ) ;
181
+ return match . Success ? match . Groups [ 1 ] . Value : string . Empty ;
182
182
}
183
183
184
184
/// <summary>
Original file line number Diff line number Diff line change 30
30
using Chapter = SIL . XForge . Scripture . Models . Chapter ;
31
31
using TextInfo = SIL . XForge . Scripture . Models . TextInfo ;
32
32
33
+ // Disable notice "The logging message template should not vary between calls to..."
33
34
#pragma warning disable CA2254
34
35
35
36
namespace SIL . XForge . Scripture . Services ;
@@ -167,7 +168,9 @@ await hubContext.NotifyDraftApplyProgress(
167
168
await hubContext . NotifyDraftApplyProgress ( sfProjectId , new DraftApplyState { State = message } ) ;
168
169
}
169
170
170
- // Ensure that if chapters is blank, it contains every chapter in the book
171
+ // Ensure that if chapters is blank, it contains every chapter in the book.
172
+ // ScriptureRangeParser will return no chapters, meaning all chapters,
173
+ // if the scripture range just specifies a book without chapter numbers.
171
174
List < int > chapters = bookChapters ;
172
175
if ( chapters . Count == 0 )
173
176
{
You can’t perform that action at this time.
0 commit comments