-
Notifications
You must be signed in to change notification settings - Fork 41
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
Support @param syntax in templates #70
Comments
When I initially wrote this project, I thought Soy was in stable maintenance mode, but it turned out that the team has continued to add features / change existing ones, and I haven't even tried to keep pace. I'd certainly be happy to work with you on pull requests adding parity features if you're interested to work on it. In full disclosure, I also wanted to point out that there's an alternative which uses the official JS implementation on otto (a js interpreter in Go): https://code.taxi/socialworkout/soyotto. That repo also has a reference to Google's internal Go soy renderer. It looks like he's opted out of Github, but maybe @hochhaus could weigh in on if there's any interest on Google's part in open source it. |
Hi @rehmsen and @robfig. Glad to see interest in go closure templates. I left Google in 2008 so I can't comment on their interest level in open sourcing pure go closure templates code. If I had to guess, chances are low since we have not seen any code thus far. Unfortunately, I also can't recommend using soyotto as I am no longer maintaining it and it is not in active use for any projects (as far as I am aware). |
Thanks for the response, @robfig and @hochhaus. We have in the meanwhile found another work around. We are only using this library for a small development server and it was not worth it on our end to update the lexer/parser to work with the new feature. So feel free to keep this open or close it, as you see fit. |
For what it's worth, I've quickly hacked together non-soydoc (gonna call it 'native' from now on) parameter syntax in templates over at https://github.com/q3k/soy/tree/q3k/non-soydoc-params . If there's interest, I can spend a bit more time to support default parameters and generally clean this up, and send a PR. |
The documentation for Closure Templates has examples of the param syntax:
This parser does not seem to support that though - I get:
I think an older syntax for the same was to use comments:
But that is no longer supported by some other parsers we use, and this one which does not support the new one. I think I would be great to add support for this.
I might be able to contribute something - is somebody already aware of this issue or has tried to fix it? Any pointers?
The text was updated successfully, but these errors were encountered: