Skip to content

Commit

Permalink
exclamation mark anywhere but at the beginning of a syllable
Browse files Browse the repository at this point in the history
is a valid lyrics character and must be preserved in the gabc output
  • Loading branch information
igneus committed Mar 13, 2022
1 parent b8e838e commit 7fea705
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gly/music_with_lyrics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def nonlyrical_lyrics?(syl)
end

def strip_directives(syl)
syl.sub(/(\s*)!/, '\1') # exclamation mark at the beginning - place even under nonlyrical music chunk
syl.sub(/^!/, '') # exclamation mark at the beginning - place even under nonlyrical music chunk
end
end
end
2 changes: 2 additions & 0 deletions tests/examples/gly/expected/lyrics_exclamation_mark.gabc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%%
(c4) ah!(i) a!h(i)
2 changes: 2 additions & 0 deletions tests/examples/gly/given/lyrics_exclamation_mark.gly
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
c4 i i
\l ah! a!h

0 comments on commit 7fea705

Please sign in to comment.