Feat/trailing chord test and tweaks #259
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a test for the trailing chord.
While adding the test I noticed something that was a bit off so I made an adjustment.
before it would render like this:
![CleanShot 2022-08-24 at 13 12 08](https://user-images.githubusercontent.com/23046374/186514179-f881e95b-a76c-4700-85f2-669d63b439ac.png)
Where the first chord lyric pair would create this block
![CleanShot 2022-08-24 at 13 12 43](https://user-images.githubusercontent.com/23046374/186514285-1b6c9e27-add5-48fb-a334-5cac09a4a714.png)
Where it's a chord "D" paired up with a space.
The problem was that the space just doesn't have any impact on the formatting because the chord character would always be wider than the space. Though intuitively I would like to see a space character between the chord and the next lyric. Which you can also see in #214 PraiseCharts examples.
In this PR I adjusted the formatters so that when
lyrics = ' '
it add's a space to the chord.This makes it so that it looks like this:
![CleanShot 2022-08-24 at 13 15 10](https://user-images.githubusercontent.com/23046374/186514683-dd96daf6-7e61-4f1d-a0f7-397b5f95f3a9.png)
![CleanShot 2022-08-24 at 13 15 27](https://user-images.githubusercontent.com/23046374/186514721-59599420-f5d5-4c41-8517-d6714921df65.png)
This also creates a benefit for when there are chords in chordpro only separated by a space.
ie:
With this PR there will be a space rendered between the 3 chords at the end, Instead of being right next to each other.
Thoughts?