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

Assignment in a comparison is not functioning #37

Closed
ghost opened this issue Sep 21, 2019 · 1 comment
Closed

Assignment in a comparison is not functioning #37

ghost opened this issue Sep 21, 2019 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Sep 21, 2019

Template example: "{if $info = "test"}{$info}{/if}"
Expected result: "test"
Actual result: empty string, no execution of code inside the "if" block.

This construction is functioning in PHP version of Smarty.

Code to reproduce:

<script> var templateText = '{if $info = "test"}{$info}{/if}'; window.onload = function() { var template = new jSmart(templateText); document.getElementById('test').innerHTML = template.fetch(); }; </script>
@umakantp umakantp added the bug label May 27, 2021
@umakantp
Copy link
Owner

Bug has been fixed in master, should be live in few days in npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant