-
Notifications
You must be signed in to change notification settings - Fork 61
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
Allow lambda sections to render text #31
Comments
Agreed, that sounds useful. |
I did a quick test implementation, simonl2002/clostache@master...lambda_render What I did was if a section returned a lambda, we call that lambda with a rendering function as the argument. I did it this way because passing the render function directly to a section lambda is not really compliant with the spec and would break test cases. |
Any word on this? Would be very nice... |
Sorry, slipped off my radar 😞 Reviewed the pull request, pretty much ready to merge. |
From the mustache manual:
After looking at the code appears that if a section is a function we apply it to the body
Which means there is no way for the lambda to render that text. Perhaps like the javascript mustache implementation a additional parameter should be passed into the lambda (https://github.com/janl/mustache.js#functions) for use in rendering the section contents if necessary.
An example:
The text was updated successfully, but these errors were encountered: