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

Valid Template Name format throws error when called as a function #3942

Closed
ghost opened this issue May 18, 2020 · 2 comments · Fixed by #3946
Closed

Valid Template Name format throws error when called as a function #3942

ghost opened this issue May 18, 2020 · 2 comments · Fixed by #3946
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository. R10 Release 10 - August 17th, 2020
Milestone

Comments

@ghost
Copy link

ghost commented May 18, 2020

Version

4.9.1

Describe the bug

Template names in this format:

# 1.3.2.TryThis

Throw an error when called as a function:

# 1.3.1.NotUnderstoodMessaging
- I'm sorry, I'm not able to help with that. ${1.3.2.TryThis()}
- Sorry, that’s not something I can help with yet. ${1.3.2.TryThis()}
- Apologies, I don’t know how to do that right now. ${1.3.2.TryThis()}
- Unfortunately I can’t help you with that right now. Apologies. ${1.3.2.TryThis()}
- Sorry, that’s not something I can help with yet. ${1.3.2.TryThis()}
- Apologies, I don’t know how to do that right now. ${1.3.2.TryThis()}

To Reproduce

Steps to reproduce the behavior:

  1. Copy above markdown
  2. Evaluate

Expected behavior

Template names can include letter numbers and . Templates name spaced with numerals are valid and should be allowed to be called as functions

Additional context

[Error] line 48:0 - line 48:63: [1.3.1.NotUnderstoodMessaging]Error occurred when parsing expression '1.3.2.TryThis()'. mismatched input '2' expecting IDENTIFIER
[Error] line 49:0 - line 49:69: [1.3.1.NotUnderstoodMessaging]Error occurred when parsing expression '1.3.2.TryThis()'. mismatched input '2' expecting IDENTIFIER
[Error] line 50:0 - line 50:70: [1.3.1.NotUnderstoodMessaging]Error occurred when parsing expression '1.3.2.TryThis()'. mismatched input '2' expecting IDENTIFIER
[Error] line 51:0 - line 51:83: [1.3.1.NotUnderstoodMessaging]Error occurred when parsing expression '1.3.2.TryThis()'. mismatched input '2' expecting IDENTIFIER
[Error] line 52:0 - line 52:69: [1.3.1.NotUnderstoodMessaging]Error occurred when parsing expression '1.3.2.TryThis()'. mismatched input '2' expecting IDENTIFIER
[Error] line 53:0 - line 53:70: [1.3.1.NotUnderstoodMessaging]Error occurred when parsing expression '1.3.2.TryThis()'. mismatched input '2' expecting IDENTIFIER

[bug]

@Danieladu Danieladu added LG R10 Release 10 - August 17th, 2020 labels May 18, 2020
@Danieladu
Copy link
Contributor

Danieladu commented May 18, 2020

Thanks Joe. Sorry for the block and hmmm.. It is indeed a bug. The workaround is to replace the pure numbers with letters between every two dots of template name.

The reason for this problem is that the format limits of template name and function name are different. The function name's format cannot cover all template name's formats.

The valid format of template name is

start with letter/number/_ and can only contains letter/number/./_

And the valid format of function name should meet

foreach(var part in expression.split('.')) 
{
    // part should start with letter/_ and can only contains letter/number/_
}

We will fix this issue as soon as possible.

@benbrown benbrown added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository. labels May 18, 2020
@benbrown benbrown self-assigned this May 18, 2020
@ghost
Copy link
Author

ghost commented May 21, 2020

Makes total sense thanks!

@munozemilio munozemilio added this to the R10 milestone Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository. R10 Release 10 - August 17th, 2020
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants