haje61 / Kamelon

Kamelon is a versatile and fully programmable textual content parser that is extremely well suited for syntax highlighting and code folding
Other
2 stars 5 forks source link

LilyPond: title and subtitle appear incorrect in the reference file #4

Closed cxw42 closed 1 month ago

cxw42 commented 4 years ago

Thank you for this project! I am hoping to use it in my new static site generator, App::unbelievable. Please see screenshot below:

image

The reference file is shown on the top half. The LilyPond output shows that title and subtitle are not highlighted (red rectangle). However, as I am working on RT#129134, it appears to me they should be. I fixed the regex and got the highlighted output on the bottom half (blue rectangle). I see from the LilyPond docs that title and subtitle are valid variables in \header, so I think they should be highlighted along with composer and tagline. (year is not listed in those docs, so is properly left un-highlighted.)

What do you think? Thank you for considering this question!

haje61 commented 4 years ago

Hello Chris,

Thanks for looking into this.

At this moment I am fighting a tumor. I will not spend time on this in the foreseeable future.

I would like to point out though that it does not make much sense to alter the xml files. With each update I have always included the latest sml files directly from Kate. So what you do could eventually be overwritten. If the xml file is buggy it may be better to contact the author of it.

And yes, if you change an xml file you have to change the corresponding reference file as well. That is true.

This convert to Alt module for testing intrigues me. I did not know this existed. So this is the way to test for Perl versions that are not on my machine. Gonna learn more about it some day.

For now, have a good day. Thank you.

Best regards,

Hans Jeuken

On vrijdag 31 januari 2020 05:03:01 CET Chris White wrote:

Thank you for this project! I am hoping to use it in my new static site generator, App::unbelievable. Please see screenshot below:

image

The reference file is shown on the top half. The LilyPond output shows that title and subtitle are not highlighted (red rectangle). However, as I am working on RT#129134, it appears to me they should be. I fixed the regex and got the highlighted output on the bottom half (blue rectangle). I see from the [LilyPond docs](http://lilypond.org/doc/v2.18/Documentation/notation/creating-titles-> headers-and-footers#default-layout-of-bookpart-and-score-titles) that title and subtitle are valid variables in \header, so I think they should be highlighted along with composer and tagline. (year is not listed in those docs, so is properly left un-highlighted.)

What do you think? Thank you for considering this question!

cxw42 commented 4 years ago

Hans,

Thanks very much for your reply! I am very sorry to hear about the tumor. I wish you a quick and complete recovery! I understand you may not respond, or a response may be delayed.

The XML file is not buggy --- Kate's regex syntax is different from Perl's since 5.26. Would it be possible to release a temporary XML patch to fix the test failures? I could then later write a translator that would convert Kate's regex syntax to Perl's. Of course, I would be happy do to the work of making the patch and release if you would be open to that course of action.

Thanks, and best wishes!

Chris

haje61 commented 2 years ago

Hello Chris,

Thank you for your patience. Fir now I have resolved the issue by removing Lilypond from the test bench. The other 46 test samples do not show regression. A new release if available on CPAN.

I checked the repository where i get the syntax definitions from. They have not been updated in six years. So I am open to your suggestion of improving the xml syntax definitions.

Do you still have that patch laying around somewhere? Best regards,

Hans