-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Mustache specs - lambda compliance #304
base: master
Are you sure you want to change the base?
Mustache specs - lambda compliance #304
Conversation
…bda should be interpolated. This breaks one of the current tests of lambdas (higher order sections), as it asumes that the result is not interpolated. I updated the test so that it pass.
@danielfagerstrom I've merged the first few commits of this pull request already. Would you please rework this request to only include the last two commits (i.e. the ones that have to do with lambda compliance)? Thanks! |
In version
returns:
Expected
Are they going to be included soon? |
hmm... perhaps related?.. i tried doing exactly this --> mustache/spec#54 (comment) specifically: view model:
base.mustache
text.mustache
image.mustache ">
expected output:
actual output:
|
I've encountered this recently. What's the current state of play if I were to take on the remaining changes? Relevant part of the spec: https://github.com/mustache/spec/blob/master/specs/~lambdas.yml#L29 |
Is there any update on this? I am still seeing this issue with lambda's where |
Fixed most of the failing lambda tests from the Mustache spec from my Mustache spec pull request.
The spec says that for a function that is returned in a section or an interpolation:
treatable as an arity 0 function, and invoked as such. The returned value
MUST be rendered against the default delimiters, then interpolated in place
of the lambda.
as an arity 1 function, and invoked as such (passing a String containing the
unprocessed section contents). The returned value MUST be rendered against
the current delimiters, then interpolated in place of the section.
In current mustache.js the return value from a function in a interpolation or section is not interpolated so I implemented that.
For the section functions this breaks one of the current tests so I updated that one.
The test for "Section - Alternate Delimiters - Lambdas used for sections should parse with the current delimiters." still fails, I couldn't find any reasonably simple way to fix that.