Closed thegrandpoobah closed 12 months ago
According to the spec (from the section YAML, not mentioned in interpolation YAML):
5) Otherwise, the data is the value returned by calling the method with the given name.
So the following invocation:
Mustache.render('{{foo}}', { foo: function() { return null; } });
Would render out as (at least in JavaScript anyways) null the way I am interpreting the spec. But that seems a little on the sub-optimal side. Did I mis-interpret the sepc or is this another one of those language dependent traps?
null
Thanks for the clarification.
According to the spec (from the section YAML, not mentioned in interpolation YAML):
So the following invocation:
Would render out as (at least in JavaScript anyways)
null
the way I am interpreting the spec. But that seems a little on the sub-optimal side. Did I mis-interpret the sepc or is this another one of those language dependent traps?Thanks for the clarification.