Skip to content

USFM export: emit \mt1 instead of \mt for the main title #268

Description

@henrique221

Follow-up from the review of #264 (CodeRabbit thread on usfm.service.ts), split out per Kasey's call there: "This is fine to leave for now. If we need to update the exporter for the usfm, we can do that in a separate ticket."

What

The USFM export writes the main title as \mt:

yield `\\mt ${book?.bookTitle ?? bookName}\n`;

USFM's numbered form \mt1 is the more precise marker for a first-level main title, and some downstream consumers expect the numbered variant.

Why it was not changed in #264

\mt is what the export has always emitted, and #264 keeps legacy output byte-for-byte (there is a golden test pinning it). Changing the marker is a deliberate output change for every existing project, so it deserves its own ticket and a conscious decision rather than riding along in a storage PR.

Scope if picked up

One line in createUSFMStreamForBook plus the golden test expectation, and a quick check that Paratext round-trips \mt1 the way we assume.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions