finale-lua / lua-scripts

A central repository for all Lua scripts for Finale.
https://finalelua.com
Creative Commons Zero v1.0 Universal
15 stars 14 forks source link

[BUG] Script descriptions getting scrambled #298

Open cv-on-hub opened 2 years ago

cv-on-hub commented 2 years ago

The script definitions of the last set of repo submissions are scrambled at https://www.finalelua.com/scripts.

Obviously something to do with the extraction of ScriptGroupName, but many of the most recent dozen or so suffer this scrambling. See attached cross_staff_scrambled

NOTE:
Just realised maybe it's because the [[ ... ]] header descriptions have no line breaks?

Nick-Mazuk commented 2 years ago

I see the issue, though I don't have any more time this weekend to work on it.

The metadata parser assumes that multiline strings actually span multiple lines. So here when you're defining the multiline string on a single line it doesn't see the ending so it keeps on going until there's another line that starts with ]].

https://github.com/finale-lua/lua-scripts/blob/73f327b1c2e8c4f609403da21dd1a088c4f123ed/src/cross_staff_offset.lua#L10-L27

This is a bug in the parser that should be fixed, but I also don't know when I'll next have time to fix it (I probably spent too much time on Lua stuff this weekend).

cv-on-hub commented 2 years ago

Yes @Nick-Mazuk - you've had nose heavy on the grindstone. I'll re-submit what I can with real multiline statements.

rpatters1 commented 2 years ago

Git is amazing until that 1% of the time when it's a nightmare. Good luck, y'all.

Nick-Mazuk commented 2 years ago

I'll re-submit what I can with real multiline statements.

If we can keep this issue open even after these PRs that would be great. That way we can keep track of it here so when I get another sprint to work on Lua stuff I know to fix the underlying issue.