Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/trailing chord test and tweaks #259

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

isaiahdahl
Copy link

@isaiahdahl isaiahdahl commented Aug 24, 2022

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

Where the first chord lyric pair would create this block
CleanShot 2022-08-24 at 13 12 43

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
CleanShot 2022-08-24 at 13 15 27

This also creates a benefit for when there are chords in chordpro only separated by a space.

ie:

Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be
[C]Whisper words of [F]wis[G]dom, let it [F]be [C/E] [Dm] [C]

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?

… chord lyrics pair so that the trailing space cascades down to the formatters
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