MobileSheets Forums

Full Version: ChordPro skips some lines
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
To be able to switch between various sophisticated songlist, title or caption formats I store them in a file and copy/paste from there when required.
For that file I (mis-)use ChordPro format to have some basic formatting options.
When I open that file in MSP some lines are missing, see screenshot. The MSP editor shows everything correctly and Sciurius' ChordPro reference implementation renders the file without issues.

The UI to add attachments to the forum seems to have changed. It is worse as it was before.
I'm not able to attach .pro file. I think that was possible a while ago.
It is not clearly shown if attaching a file was successful or not
At the moment, if I detect braces on a line, I assume a chord pro directive is being used, which changes how the line is processed. I'll have to change the code to ignore invalid chord pro directives instead of just not rendering the line.

I'm not sure why the UI to add attachments would have changed... The forum software is still configured so that it should allow .pro files as an attachment. I'll have to look into this some more.
It turns out the problem is due to the theme. If you change the theme at the bottom right to "Default" before uploading the attachment, then you can upload chordpro files without issue. I've been digging through the theme templates, but I still haven't found the cause for the error with the duende theme. Hopefully I can find it at some point, but at least there is a workaround.

Mike
It took some digging, but I finally found the piece of missing code in the template. Attachments can now be added normally with the duende theme.

Thanks,
Mike
(01-06-2022, 05:58 AM)Zubersoft Wrote: [ -> ]At the moment, if I detect braces on a line, I assume a chord pro directive is being used,

ChordPro directives should be alone on the line, so a safe(r ) criterium is that the line starts with a brace.
I've adjusted the code to only process chord pro directives on lines that start with a brace. This fixes the problem itsme reported. Thanks for the suggestion Johan.

Mike