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

comments in parameter lists #1227

Open
martin19 opened this issue Feb 21, 2023 · 2 comments
Open

comments in parameter lists #1227

martin19 opened this issue Feb 21, 2023 · 2 comments

Comments

@martin19
Copy link

I don't know if this is an issue but it cost me all morning to figure out:

comments in parameter lists compile but parameters after the comment are not recognized as parameters. I am using this templating engine soy/metal.js in liferay7. soy/metal.js just quietly accepts this but does never update the parameter after the comment through data binding.

{template .render}
    {@param? thisWill: ?}
//    {@param? foobar: bool}
    {@param? breakTheTemplate: bool}
@emspishak
Copy link
Contributor

Thank you for reaching out! Are you sure this is a bug in Soy itself, or could it be a bug in Liferay or soy/metal.js (which are both maintained independent from this Soy project)?

@martin19
Copy link
Author

Hi, wouldn't be surprised if it is a matter of metal-soy-liferay integration rather than a closure-templates issue - but i cannot tell that. Seems the soy-compiler accepts this and compiles the template to js at build time, at js runtime however the variable is not available in generated js template code. (I think it was metaljs code I've stepped through in the js debugger).

I've added this to the list of my "don't s" - so feel free to close this if it is not an issue for you.

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