Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ConvertUsfmVersificationHandler does not move headings immediately before re-versified verses to the new chapter

Open
#518 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@Enkidu93 is already working on this.

Since Sep 24, 2026.

Assessment

This issue has not been assessed yet.

Description

When changing versification moves verses to a new chapter (i.e. from English Joel 2:28-32 to Hebrew Joel 3:1-5, the headings and other non-verse text content should be moved to the start of the new chapter, for example:

[Test]
public void GetUsfm_PreceedingHeadingsNotMoved()
{
	// English vs. Original
	// JOL 2:27-28 = JOL 2:27-3:1

	string usfm =
		@"\id JOL
\c 2
\v 27 Then you will know that I am present in Israel
\q2 and that I am the LORD your God,
\q2 and there is no other.
\q1 My people will never again
\q2 be put to shame.
\s1 I Will Pour Out My Spirit
\r (Acts 2:14–36)
\q1
\v 28 And afterward, I will pour out My Spirit on all people.
\q2 Your sons and daughters will prophesy,
\q1 your old men will dream dreams,
\q2 your young men will see visions.
";

	string target = UpdateUsfm(usfm, sourceVersification: ScrVers.English, targetVersification: ScrVers.Original);
	string result =
		@"\id JOL
\c 2
\v 27 Then you will know that I am present in Israel
\q2 and that I am the LORD your God,
\q2 and there is no other.
\q1 My people will never again
\q2 be put to shame.
\c 3
\s1 I Will Pour Out My Spirit
\r (Acts 2:14–36)
\q1
\v 28 And afterward, I will pour out My Spirit on all people.
\q2 Your sons and daughters will prophesy,
\q1 your old men will dream dreams,
\q2 your young men will see visions.
";
	AssertUsfmEquals(target, result);
}

Instead, the following USFM is generated:

\id JOL
\c 2
\v 27 Then you will know that I am present in Israel
\q2 and that I am the LORD your God,
\q2 and there is no other.
\q1 My people will never again
\q2 be put to shame.
\s1 I Will Pour Out My Spirit
\r (Acts 2:14–36)
\q1
\c 3
\nb
\v 1 And afterward, I will pour out My Spirit on all people.
\q2 Your sons and daughters will prophesy,
\q1 your old men will dream dreams,
\q2 your young men will see visions.
Dominant language
C#
Stars
29
Forks
17
Avg merge
2d 5h
Merged PRs (30d)
7

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sillsdev/machine

All issues in sillsdev/machine

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.