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

alphaTex rest after section tag causes parsing error #683

Closed
1 task done
jonaro00 opened this issue Nov 27, 2021 · 1 comment · Fixed by #685
Closed
1 task done

alphaTex rest after section tag causes parsing error #683

jonaro00 opened this issue Nov 27, 2021 · 1 comment · Fixed by #685
Assignees

Comments

@jonaro00
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Starting a bar with a rest directly after a symbol-less \section tag causes the r in the rest to be parsed as the section name, as the \section tag reads up to two "names" after it. Although this is the "expected" behavior from the parser, it leads to some confusion when learning the language.

This...

1.3.4*4 |
\section Verse
r.1 | 2.3.4*4 |

...causes this to be rendered:
image

My current workaround is to start the bar with a duration range instead:

1.3.4*4 |
\section Verse
:1 r | 2.3.4*4 |

Expected Behavior

The expected behavior from a new user of alphaTex would be for the r to be parsed as a rest in the example from above.
image

My suggested solution at this stage would be to disallow section names to be r, as it seems very unlikely for someone to legitimately use that. Fixing the "bug" and the confusion it brings is probably worth it. However, there are probably even better solutions to this problem.

Steps To Reproduce

See above

Link to jsFiddle, CodePen, Project

No response

Found in Version

1.2

Platform

Web

Environment

- **OS**: Windows 10
- **Browser**: Chromium 96

Anything else?

No response

@Danielku15
Copy link
Member

I added some detection to alphaTex. With this change you cannot use just x - or r as section text, but I guess nobody will do that anyhow. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants