Skip to content

Fix double mappings handling and expand trailing paragraph marker definition - #521

Open
Enkidu93 wants to merge 3 commits into
masterfrom
fix-usfm-conversion-bugs
Open

Enkidu93 wants to merge 3 commits into
masterfrom
fix-usfm-conversion-bugs

Conversation

@Enkidu93

@Enkidu93 Enkidu93 commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #517, #518.


This change is Reviewable

When a verse range started with a verse that was already written, the
whole range marker was dropped, merging later verses into the previous
one. Now only the duplicated verse is suppressed and the rest of the
range is still written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.11%. Comparing base (f853eef) to head (e69e44e).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #521      +/-   ##
==========================================
+ Coverage   74.09%   74.11%   +0.01%     
==========================================
  Files         456      456              
  Lines       38107    38119      +12     
  Branches     5221     5226       +5     
==========================================
+ Hits        28237    28250      +13     
  Misses       8712     8712              
+ Partials     1158     1157       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Preserved trailing paragraph markers collected before a verse that is
not kept were flushed at the next kept verse, producing stray empty
paragraphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@ddaspit ddaspit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed two fixes.

@ddaspit reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Enkidu93 and pmachapman).


tests/SIL.Machine.Tests/Corpora/ConvertUsfmVersificationHandlerTests.cs line 977 at r3 (raw file):

        string[] targetLines = target.Split('\n');
        string[] truthLines = truth.Split('\n');
        // Assert.That(targetLines.Length, Is.EqualTo(truthLines.Length));

Nit: did you mean to comment this out?

@pmachapman pmachapman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: This worked well for my test projects.

@pmachapman reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Enkidu93).

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.

ConvertUsfmVersificationHandler doesn't merge verses correctly

4 participants