gregorio-project / gregorio

The Gregorio Project
http://gregorio-project.github.io
Other
164 stars 43 forks source link

hyphen before <i> causes "repeated style" error #1538

Closed gabrielmass closed 3 years ago

gabrielmass commented 3 years ago

In gregorio 5.2.1, placing a hyphen immediately before an "<i>" leads to gregorio aborting with an error message.

Sample GABC file: name: March 30 sample; %% (c3)For(h)-<i>ev</i>(h)er(h)

Result of processing: $ gregorio a189517.gabc 997: in function `gregorio_rebuild_characters': assertion:encountered repeated style $ echo $? 1

henryso commented 3 years ago

This seems to only happen if the hyphen is the first thing in the syllable test.

henryso commented 3 years ago

OK, I know why this is happening, but the fix will be a little tricky. It's definitely a bug due to the handling of the hyphen which causes it to have higher precedence (in computer science terms) than other characters.

henryso commented 3 years ago

I have a fix ready for this, but due to the effect of #1504 on tests, I'll wait until that one is reviewed and merged before proposing this one.

henryso commented 3 years ago

@gabrielmass This should be fixed in the development branch. Please comment here if it doesn't work for you.