Open phillipskevin opened 5 years ago
I'm not sure this is necessarily wrong ... foo()
is returning a truthy
value, so it makes sense that <p>this is NOT foo</p>
would then be readered as if foo()
returned a true
or 1
.
We could change this to make # VALUE
do something different if given a fragment.
Yeah, I can’t think of a situation where you would want to return a fragment and not have it rendered.
Alternatively, you can make this work by setting options.metadata.rendered = true;
in the helper. This is what stache does internally when you call options.fn()
or options.inverse()
so it knows to display the fragment.
In 3.0, this would create a fragment containing
<p>this is foo</p>
:...in 4.0, it only contains
<p>this is NOT foo</p>
.3.0 version: https://codepen.io/kphillips86/pen/eQwjZz 4.0 version: https://codepen.io/kphillips86/pen/EOBpVZ
cc @mjstahl.