MobileSheets Forums

Full Version: ChordPro and comment at line end
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
if I use a comment at the end of a ChordPro line, MSP displays the comment but not the text/chords before in the same line.

Example from a ChordPro file:


Code:
... pa[F]ure {c:Repeat F...}

just displays

Repeate F...
but not
        F
... paure Repeat F...
I just tested this with the reference implementation of chord pro and it completely ignores the comment directive if it's not at the start of the line (sciurius, correct me if I'm wrong).  So in the reference implementation, you will actually see {c:Repeat F...} at the end of the line. So perhaps my implementation is incorrect as I'm ignoring the rest of the line if I detect a comment anywhere in it.  I don't think it's valid to use the comment directive at the end of a line though. It's not meant to be used to format a small section of text to make it italic. It's meant to make an entire line italicized. The upcoming pango syntax support will allow for individual sections of a sentence to be formatted though, so I think that's ultimately what you will want to utilize.

Mike
Thanks for your quick response.

Indeed, ChordPro states "comment line". I prepared the files with Songpress (https://www.skeed.it/songpress), which has then a rather lazy interpretation here. Just overlooked it, might be as I viewed the format more from a programming language perspective, where this interpretation would be rather problematic Blush

I will keep the difference in mind and if pango is better, I'm looking forward to it. Hopefully, it also supports some length/tact hints for non-singers...
The ChordPro spec explicitly defines directives (e.g. {c: ...}) to be alone on a separate line. This works in all tools.

For most, hopefully all, purposes where embedded directives would typically be used the upcoming support for the Pango Markup language can be used.
(11-13-2019, 05:21 PM)sciurius Wrote: [ -> ]The ChordPro spec explicitly defines directives (e.g. {c: ...}) to be alone on a separate line. This works in all tools.

For most, hopefully all, purposes where embedded directives would typically be used the upcoming support for the Pango Markup language can be used.

Thanks, I'm looking forward to the Pango integration...
You can participate in testing. See https://groups.google.com/forum/#!topic/...8wBjsX-nHA.
Thank you for the invitation. I will try to find a bit time to look at it and to experiment with my formatting ideas, probably beginning/mid of next week.