I'm trying to get the following output (bar will be replaced with a variable via handlebars.):
${bartest}
See code sandbox here.
Compiling the template with template({foo: 'bar'}), I have tried the following:
$\\{{{foo}}test} results in ${{{foo}}test}
${{{foo}}test} results in compile error (Expecting 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'CLOSE')
How does one replace foo with bar?
You can use whitespace control: ${ {{~foo~}} test} (http://handlebarsjs.com/expressions.html#whitespace-control)
Most helpful comment
You can use whitespace control:
${ {{~foo~}} test}(http://handlebarsjs.com/expressions.html#whitespace-control)