Closed andreashasse closed 11 years ago
@anha0825 Could you please add a test suite for this?
Are you kidding? You have a template engine with two super tiny tests which barely deserve the name. This library had a bug (booleans) for several months, compromising one major feature and you are asking the contributors to add a test suite before even considering it? Classy!
We have to start adding tests at some point. It's better to start it sooner than later.
The function mustache:compiler/2 generate a complex structure of fun out of the template. When you have a template like this one: {{#apis}} {{url}} {{#method}} {{stuff}} {{/method}} {{/apis}}
... and apis and methods are different lists, the method will generete a error message. This is a small demonstration of the problem:
(fun() -> List = a, (fun() -> List = b, List end)() end)().
This pull request might not be the best solution, but I hope it works.