google/closure-templates

comments in parameter lists

martin19 opened this issue · 2 comments

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}

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)?

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.