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

Parametrized lambda support #133

Open
jvmlet opened this issue Feb 15, 2022 · 4 comments
Open

Parametrized lambda support #133

jvmlet opened this issue Feb 15, 2022 · 4 comments

Comments

@jvmlet
Copy link

jvmlet commented Feb 15, 2022

Is parametrized lambda supported ?
Looking for something like below :

{{myLambda [param1='val1',param2=2]}}  inner  {{\myLambda}} 
@agentgt
Copy link
Contributor

agentgt commented Mar 31, 2022

Handlebars allows that. If you want that look into Handlebars.java.

@jvmlet
Copy link
Author

jvmlet commented Mar 31, 2022

Thanks @agentgt, I'm aware about handlebars

@agentgt
Copy link
Contributor

agentgt commented Mar 31, 2022

Yes but your request seems kind of out of scope for a library that mostly follows the mustache spec.

Adding parameters basically makes it not logic-less and there is a library with a spec that has lambda with parameters aka handlebars.

@agentgt
Copy link
Contributor

agentgt commented Dec 4, 2023

@jvmlet Did you ever solve your problem?

I forgot to mention you could also use Mustache Lambdas and parse the section body or do a builder approach where you return a lambda that returns an object that has more lambdas.

If you are still interested I can show the builder approach with some code.

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