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

[BUG] Script descriptions getting scrambled #298

Open
cv-on-hub opened this issue Aug 1, 2022 · 4 comments
Open

[BUG] Script descriptions getting scrambled #298

cv-on-hub opened this issue Aug 1, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@cv-on-hub
Copy link
Contributor

cv-on-hub commented Aug 1, 2022

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?

@cv-on-hub cv-on-hub added the bug Something isn't working label Aug 1, 2022
@Nick-Mazuk
Copy link
Member

Nick-Mazuk commented Aug 1, 2022

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 ]].

finaleplugin.AdditionalMenuOptions = [[ CrossStaff Offset No Dialog ]]
finaleplugin.AdditionalUndoText = [[ CrossStaff Offset No Dialog ]]
finaleplugin.AdditionalPrefixes = [[ no_user_dialog = true ]]
finaleplugin.AdditionalDescriptions = [[ Offset horizontal position of cross-staff note entries - NO DIALOG ]]
finaleplugin.Notes = [[
When creating cross-staff notes using the option-downarrow shortcut, the stems of
'crossed' notes are reversed (on the wrong side of the notehead) and appear too far
to the right (if shifting downwards) by the width of one notehead, typically 24EVPU.
This script lets you set a horizontal offset for all cross-staff notes in the
selected region, with a different offset for non-crossed notes.
For crossing to the staff below use (-24,0) or (-12,12).
For crossing to the staff above use (24,0) or (12,-12).
Also specify which layer number to act upon (1-4) or "all layers" (0).
(This also offers a simple way to reset the horizontal offset of all notes in the selection to zero).
This script adds an extra `NO DIALOG` menu item to rapidly duplicate the last action
without using a confirmation dialog.
]]

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
Copy link
Contributor Author

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

@rpatters1
Copy link
Collaborator

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

@Nick-Mazuk
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants