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

Parenthesis (round brackets) in a variable name prevents the usage of that variable #483

Open
JunaidZA opened this issue Dec 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@JunaidZA
Copy link

JunaidZA commented Dec 24, 2023

Describe the bug
Parenthesis (round brackets) in a variable name prevents the usage of that variable, and a single parenthesis, either one, breaks the Cottle evaluation and throws an error on the button.

To Reproduce
Steps to reproduce the behavior:

  1. Open Macro Deck on PC
  2. Create a variable with a parenthesis (brackets) in its name eg: 'test(1)' or 'test)2'
  3. Try to use that variable on a button
  4. Note the value does not appear
  5. If you try a single parenthesis, you get an error when trying to use the variable: "Error: expected block continue or block end, found 3"

Expected behavior
The variable is able to be used.

Additional context
I have not tested this bug on the stable version, only on the latest beta (b12).
Cottle.Document.CreateDefault method incorrectly creates the DocumentResult when a template with parenthesis is passed in.

Possible solution
Macro Deck could strip out or replace any parenthesis in variable names like it does with slashes, periods, spaces and pipes.

@JunaidZA JunaidZA added the bug Something isn't working label Dec 24, 2023
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

1 participant