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

Implement ChordPro annotations #1127

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Conversation

martijnversluis
Copy link
Owner

@martijnversluis martijnversluis commented Mar 13, 2024

Quoted from the ChordPro docs
(https://www.chordpro.org/chordpro/chordpro-introduction/#markup-and-annotations):

Annotations are textual remarks placed above the lyrics, just like chords. Annotations are specified with [*text], again just like chords. Depending on the software used to process the ChordPro data, annotations may be rendered in an outstanding manner.

This is a first iteration on annotation support, where the annotation is added to a ChordLyricsPair. The pair can either have chords or annotation.

In TextFormatter and ChordsOverWordsFormatter annotations are treated equally to lyrics. In HtmlDivFormatter and HtmlTableFormatter annotatioins are rendered similar to how lyrics are rendered, but the wrapping element is given the css class annotation instead of lyrics.

See https://www.chordpro.org/chordpro/chordpro-introduction/#markup-and-annotations

Resolves #980

@martijnversluis martijnversluis self-assigned this Mar 13, 2024
Quoted from the ChordPro docs
(https://www.chordpro.org/chordpro/chordpro-introduction/#markup-and-annotations):

Annotations are textual remarks placed above the lyrics, just like chords.
Annotations are specified with [*text], again just like chords. Depending
on the software used to process the ChordPro data, annotations may be
rendered in an outstanding manner.

This is a first iteration on annotation support, where the annotation is
added to a `ChordLyricsPair`. The pair can either have `chords` or
`annotation`.

In `TextFormatter` and `ChordsOverWordsFormatter` annotations are
treated equally to lyrics. In `HtmlDivFormatter` and
`HtmlTableFormatter` annotatioins are rendered similar to how lyrics are
rendered, but the wrapping element is given the css class `annotation`
instead of `lyrics`.

See https://www.chordpro.org/chordpro/chordpro-introduction/#markup-and-annotations

Resolves #980
Copy link

codeclimate bot commented Mar 13, 2024

Code Climate has analyzed commit df27dbf and detected 0 issues on this pull request.

View more on Code Climate.

@martijnversluis martijnversluis merged commit 3a6e238 into master Mar 13, 2024
6 checks passed
@martijnversluis martijnversluis deleted the implement-annotations branch March 13, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Support for annotations
1 participant