Skip to content

Support VerseRefs with segments across versifications#415

Open
Enkidu93 wants to merge 1 commit into
masterfrom
verse_segments_across_versifications
Open

Support VerseRefs with segments across versifications#415
Enkidu93 wants to merge 1 commit into
masterfrom
verse_segments_across_versifications

Conversation

@Enkidu93
Copy link
Copy Markdown
Collaborator

@Enkidu93 Enkidu93 commented May 11, 2026

Includes:

  • Add test to cover alignment of verses across versifications with segments (e.g., a,b,c...).
  • Strip segments when converting/comparing refs with verse segments across versifications because VerseRef does not support it properly

This fixes an issue Michael recently brought up on slack: https://sil-language-software.slack.com/archives/C06A8JFBU5S/p1778328868601589. (I can create a retroactive issue if you would like). I decided to prioritize this because depending on the problem, it could be causing catastrophic misalignment - especially for silnlp - and it was in this case.

The root of this problem is that ChangeVersification() (and by extension VerseRef.CompareTo()) exhibit very odd behavior when working with verse segments. Basically,

var vrS = new VerseRef("NUM 17:1a", ScrVers.Original);
var vr = new VerseRef("NUM 17:1", ScrVers.Original);

vrS.ChangeVersification(ScrVers.English);
vr.ChangeVersification(ScrVers.English);

// Now
// vr == new VerseRef("NUM 16:36", ScrVers.English) :heavy_check_mark: 
// but 
// vrS == new VerseRef("NUM 17:1a", ScrVers.English) :exploding_head: 

This change is Reviewable

…gments across versifications because VerseRef does not support it properly
@Enkidu93 Enkidu93 requested a review from ddaspit May 11, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant