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

[Spec] Allow Empty Lines #50

Open
codello opened this issue Mar 8, 2024 · 2 comments
Open

[Spec] Allow Empty Lines #50

codello opened this issue Mar 8, 2024 · 2 comments
Assignees
Labels
vote now Please vote for your solution

Comments

@codello
Copy link
Contributor

codello commented Mar 8, 2024

Suggestion

Currently the spec does not specify how implementations should handle empty lines. I'd like to suggest an addition to the spec that empty line should be ignored. Furthermore I'd like to suggest that implementations should ignore lines that consist only of whitespace (to be defined by #46).

Use case

There are several use cases:

  • When editing a song txt manually empty lines can help visually separating different passages of a song.
  • Unexperienced editors might not realize that empty lines are an error. Allowing implementations to ignore empty lines makes it easier for newcomers to start editing.
  • Unexperienced editors might not realize the difference between an empty line and a line consisting only of whitespace. These kinds of errors are usually hard to find if you don't know what you're looking for.

Extra info/examples/attachments

Currently implementations have different behavior as far as I can tell:

  • Vocaluxe ignores empty lines (but not whitespace-only lines)
  • Performous ignores empty lines (but not whitespace-only lines)
  • USDB Synced does not ignore empty lines
  • USDX ignores empty lines only between the header and the first note

Additionally we could also allow leading whitespace (i.e. whitespace before the # in a header or before the note type in the body of a file). However, this does not seem quite as useful to me.

@RumovZ
Copy link

RumovZ commented Mar 8, 2024

Allowing empty lines seems reasonable as they can be useful for grouping and are dropped easily.
On the other hand, I don't see any use case for leading whitespace, and lines containing only whitespace would only occur by (rather unlikely) accident. At the same time, this seems slightly more involved to parse correctly, so I wouldn't bother.
Of course, implementations could still choose to be more forgiving and ignore whitepsace lines without causing harm.

@codello
Copy link
Contributor Author

codello commented May 6, 2024

Given there are no other comments I think we can vote on this now with these options:

  1. Allow empty lines but not whitespace-only lines (implementations may still decide to be more forgiving) 🎉
  2. Allow empty lines and whitespace-only lines in the spec (i.e. a compliant implementation MUST ignore whitespace only lines) ❤️
  3. Do not allow empty lines (implementations may still be more forgiving) 🚀

@marwin89 marwin89 added the vote now Please vote for your solution label May 6, 2024
@marwin89 marwin89 moved this from In Discussion to Vote Now in UltraStar Song Format - Roadmap May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vote now Please vote for your solution
Projects
Development

No branches or pull requests

3 participants