Closed andrewthad closed 10 months ago
Doesn't https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/sections.yml#L56-L93 test for that? Hm. That test doesn't actually involves an array (dogs
), and that's may be why JustusAdam/mustache passes all tests and missed this case.
As it turns out, the simplified example that I gave above doesn't actually cause problems with https://github.com/JustusAdam/mustache. After playing around with my original failing case some more, I've come up with this: https://github.com/mustache/spec/pull/95/files
The issue that https://github.com/JustusAdam/mustache has is that it renders 1.1x.1y
instead of a1.A1x.A1y
. So the problem is that, within a list section, the elements on the context stack that are hashmaps are forgotten (but strings are fine, which is why my original simplified example doesn't actually create any problems).
Is this anything preventing my PR from being merged in? https://github.com/mustache/spec/pull/95/files
You need to grab the attention of a repo maintainer, which I'm not.
Closing as this seems to have been addressed with #114.
This originally came up in an issue for a haskell mustache implementation, (https://github.com/JustusAdam/mustache/issues/6) but I will describe a simpler example here with language-agnostic terminology.
Suppose that I have data represented in YAML as follows:
And a template that looks like this:
The output I expect (modulo some newlines) is:
However, the haskell mustache implementation, which completely passes version 1.1.3 of the specs, would give me this:
So, I propose adding a spec test that would assure that bound variables remain bound in a nested section. Please let me know if I can clarify this further.