Skip to content

unable to parse templates with colons in hash names #701

@Repo-SK

Description

@Repo-SK

Colons in hash names don't work. Frameworks like alpine.js use colons to detect their syntax.

Consider the following:

{{#*inline "foo"}}
  Partial
{{/inline}}

{{>foo class="bar" x-bind:disabled="true" }}

This compiles and renders fine with handlebars-js, but handlebars-rust fails to compile it with this error:

Failed to parse template Template error: invalid handlebars syntax: expected identifier, helper_parameter, or trailing_tilde_to_omit_whitespace
--> Template error in "Unnamed":5:26
|
2 | {{/inline}}
3 |
4 | {{>foo class="bar" x-bind:disabled="true" }}
|--------------------------^-----------------
|
= reason: invalid handlebars syntax: expected identifier, helper_parameter, or trailing_tilde_to_omit_whitespace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions