Nustache v1.15.0.4
- Bug Fix: Json.Net JObjects don't parse correctly as Blocks #89
- Bug Fix: DataTables with columns named after properties aren't rendered #86
- Feature: Lambda functions have been overhauled and brought in line with the mustache spec (The version we're currently targeting.)
Lambdas!
Nustache now has properly implemented Lambda functionality. This comes in two flavours, blocks ({{#MyLambda}}{{/MyLambda}}
) and variables ({{MyLambda}}
).
The outputs of Lambdas are rendered also so you can actually return valid Mustache strings which will be properly rendered!
Variable Lambdas
Variable Lambdas are functions which take no arguments and look like this:
(Lambda<object>)() => "World";
Block Lambdas
Block Lambdas are tags which wrap a section of markup which is passed to the function to manipulate in some way like this:
(Lambda<string, object>)(content) => "<b>" + content </b>;