akdubya/dustjs — Issue #50: Helper params are not processed correctly 
Author: neuronix
Created: 2012-03-07 17:09:13+00:00
State: open

In the documentation, one may read :

Parameters accept interpolated string literals as values: {#snippet id="{name}_id"/}

However, here is a test case that shows that it currently does not work :

Template

Test: {#helper foo="{name}_2"/}

Context

{
"name": "tester",
"helper": function(chunk, context, bodies, params) {
return chunk.write(params.foo);
}
}

Expected Output

Test: tester_2

Effective Output

Test: function body_1(chk,ctx){return chk.reference(ctx.get("name"),ctx,"h").write("_2");}