Closed klorenz closed 6 years ago
Hey there!
I'd love to merge this in, I'm in the middle of a summer class right now so it might be a few weeks.
I took a quick look over your code and it seems really nice. One of my biggest concerns with adding lambdas was that it wasn't part of the necessary spec, so if it slowed down rendering I'd at least want it behind a flag. However it looks like if you don't use lambdas, it's just one if statement per token, which shouldn't be too much overhead but I'll have to play with it some.
I really appreciate you doing this, as I said your code looks great and thanks for the unit tests/readme updates as well. I'll play with this when I get the chance and hopefully merge it in :)
Hi @noahmorrison ,
I have implemented a cache for lambdas for reducing your speed concerns. In case you do not manipulate the template text passed to lambda, the original tokens are fetched from cache.
Best regards, Kiwi
Sorry for the long delay til merge, but I finally got time to check it out. It looks great and I'm very happy with it. Thanks a lot :smile:
Hi @noahmorrison,
I have implemented request #27 as described in https://mustache.github.io/mustache.5.html. I have used @dunkelstern's examples as test items.
Hope you like it.
Best regards, Kiwi