Skip to content

Don't add end_markers for verse markers in usfm_stylesheet.py #263

@davidbaines

Description

@davidbaines

Verses have UsfmStyleType.CHARACTER, but never have an end_marker. The code in usfm_stylesheet.py gives a default end_marker to every CHARACTER style marker, including verse markers.

Changing this condition to exclude verses:
if tag.style_type == UsfmStyleType.CHARACTER and end_marker is None:
e.g.
if tag.style_type == UsfmStyleType.CHARACTER and end_marker is None and tag.marker != 'v':
might be an improvement.

Consider whether it would be an improvement to log a warning or raise an error when we come across a Stylesheet that doesn't specify an end_marker for CHARACTER style markers other than verses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🔖 Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions