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

Tag names can only contain what is considered an <ident> #26

Closed
SyrupThinker opened this issue Feb 10, 2019 · 1 comment
Closed

Tag names can only contain what is considered an <ident> #26

SyrupThinker opened this issue Feb 10, 2019 · 1 comment

Comments

@SyrupThinker
Copy link
Contributor

Because of this tags containing dashes (and other non <ident> characters)
will not be substituted, as can be seen here:

> perl6 -e 'use Template::Mustache; Template::Mustache.render(\'{{base00-hex}}\', { \'base00-hex\' => 1 }).say'
# OUTPUT: «{{base00-hex}}␤»

The spec leaves this point somewhat open,
but the discussion in mustache/spec#67 suggests that it can basically contain anything
that isn't interpreted in some other way (minus whitespace).

The way I see it the following token, and possibly ones using it, would need to be changed.
https://github.com/softmoth/p6-Template-Mustache/blob/5ad705e3b2e30fbc1cb9ae6590c49c7db7b51167/lib/Template/Mustache.pm#L31

@softmoth
Copy link
Owner

Thank you for the report & PR.

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

No branches or pull requests

2 participants