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 with dots is removed #169

Open
99kennetn opened this issue Aug 22, 2022 · 2 comments
Open

tag names with dots is removed #169

99kennetn opened this issue Aug 22, 2022 · 2 comments

Comments

@99kennetn
Copy link

99kennetn commented Aug 22, 2022

If i the following scenario, which is used often in the project i work with.
$template = new Template; $template->parse("Hello, {{ name.1 }}!") $template->render(array('name.1'=> 'Kennet'))
it will output
"Hello, !"
so if the array key has a . in it it does not replace the tag correctly

If i remove the . from both the parse and render function call, it works as expected, but as 'name.1' is a valid name for a php array key, i think it should work the same. Or have i missed something? :)

@99kennetn
Copy link
Author

It seems that if i change the array to be build like this
array('name' => ['1' =>'Kennet'])
it works as expected, but i still think the other scenario should be possible. :)

@schmoove
Copy link

schmoove commented Feb 8, 2024

@99kennetn only the array notation is possible in the original Ruby implementation, probably best to not introduce non-standard patterns here

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