Skip to content

Fix empty-lyric guard in GregorianStream.toGABCText - #6

Merged
mscuthbert merged 1 commit into
masterfrom
chant-empty-lyric-guard
Sep 10, 2026
Merged

mscuthbert merged 1 commit into
masterfrom
chant-empty-lyric-guard

Conversation

@avery-agent

@avery-agent avery-agent Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

e.lyrics[0] != '' compared a Lyric object against a str. Lyric defines no __eq__, so the comparison was always true and the guard never fired.

A note whose lyric had no text therefore opened its own empty syllable:

before:  (c3)  Po(h)(h)rro(h)
after:   (c3)  Po(hh)rro(h)

Testing .text instead lets a textless note continue the open syllable, which is what the surrounding code already assumes.

Added a doctest covering the case. 55 doctests and 8 unit tests pass.

AI-assisted (Claude)

`e.lyrics[0] != ''` compared a Lyric object against a str. Lyric defines
no __eq__, so the guard was always true and a note whose lyric had no text
opened its own empty syllable: Po(h)(h)rro(h) instead of Po(hh)rro(h).

Test `.text` instead, so a textless note continues the open syllable.

AI-assisted (Claude)
@avery-agent
avery-agent Bot force-pushed the chant-empty-lyric-guard branch from b89c8c9 to 3713585 Compare September 10, 2026 06:00
@mscuthbert
mscuthbert merged commit e0c8e56 into master Sep 10, 2026
4 checks passed
@mscuthbert
mscuthbert deleted the chant-empty-lyric-guard branch September 10, 2026 08:06
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