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 handling of identifiers which start with numbers #479

Merged
merged 2 commits into from Dec 6, 2021

Conversation

mkantor
Copy link
Contributor

@mkantor mkantor commented Dec 5, 2021

Fixes #450.

@mkantor
Copy link
Contributor Author

mkantor commented Dec 5, 2021

Here's an example of this working in handlebars.js. Without the grammar change in this branch handlebars-rust behaves differently (emitting no output in that example).

These test cases capture the issue called out in sunng87#450.

The handling of identifiers which start with numbers diverges from the
official JavaScript implementation of Handlebars. It's especially bad
for cases like `{{eq 1a}}`, which validly parses as `{{eq 1 a}}`!
@mkantor mkantor force-pushed the identifiers-starting-with-numbers branch from f18834b to 0772349 Compare December 5, 2021 19:28
@sunng87
Copy link
Owner

sunng87 commented Dec 6, 2021

Thank you @mkantor for the patch!

Also feel free to share your ideas with this library, I'm looking for co-maintainers of this project.

@sunng87 sunng87 merged commit 272f969 into sunng87:master Dec 6, 2021
@mkantor mkantor deleted the identifiers-starting-with-numbers branch December 8, 2021 20:16
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.

Helper arguments starting with a number are split in two parts
2 participants