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

fix: allow variables to start with numbers #25

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

guilhas07
Copy link
Contributor

Problem:

Variables in go templates can start with numbers.

https://pkg.go.dev/text/template

A variable name, which is a (possibly empty) alphanumeric string preceded by a dollar sign, 
such as $piOver2 or $ The result is the value of the variable. Variables are described below.

Example in go tests:

https://github.com/golang/go/blob/44a6f817ea0fbeb3ba4aa398794c4e80dba13b1e/src/text/template/parse/lex_test.go#L223

Solution:

Create a new token for variable identifiers.

@qvalentin
Copy link
Collaborator

Looks good, please also run npm run build to generate the helm dialect.

@qvalentin qvalentin merged commit 4cf9141 into ngalaiko:master Jan 14, 2025
@guilhas07 guilhas07 deleted the master branch January 14, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants