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

Add Support for Lambda sections #25

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

drbawb
Copy link

@drbawb drbawb commented Sep 9, 2012

I've added lambda support and three supporting test cases.

The first case shows that "sections" inside "lambdas" are passed unexpanded. (As per my interpretation of the mustache spec.)
You'd need to call render inside the lambda to expand those sections.

The second and third cases show that lambdas nested in sections now works properly.

Robert Straw added 3 commits September 9, 2012 11:21
when [boolean] section is false, lambda should not be shown
@chrneumann
Copy link

Works for me, thanks!

The text of a lambda tag is passed to the function as an
[]string of arguments now.

The text is split by (' ').split by (' ').

This change is untested, it is under development for the project
`babou` -- which is available at `github.com/drbawb/babou`.
Conflicts:
	mustache.go
	mustache_test.go
(Apparently go-fmt didn't like something.)
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

Successfully merging this pull request may close these issues.

3 participants