Description
In V2.2.17, on the V2 page, adding a Markdown field to a Details block and using Handlebars templating results in unexpected behavior.
There are two related issues:
1. Handlebars conditions are not parsed
Handlebars conditional expressions such as:
{{#if ctx.record.variable}}
hello world
{{/if}}
are not evaluated.
For example, if ctx.record.variable is true, the expected behavior is for the Details block to display:
hello world
Instead, the entire Handlebars expression is displayed as literal text:
{{#if ctx.record.variable}} hello world {{/if}}
2. Adding Handlebars content breaks other field variables
Once Handlebars template content is added to the Markdown field, it also appears to break the variable rendering for the entire markdown field.
For example, if:
{{ctx.record.variableA}}
has a value of:
hello world
the expected result is:
hello world
However, after adding the Handlebars template content, it is rendered as literal text:
{{ctx.record.variableA}}
Expected Behavior
- Handlebars expressions, including conditional helpers such as
{{#if ...}}, should be properly parsed and evaluated in the Markdown field. - Regular variables such as
{{ctx.record.variableA}}should continue to resolve to their corresponding values.
Actual Behavior
{{#if ...}}conditional expressions are displayed as literal text instead of being evaluated.- Adding Handlebars template content causes other
{{ctx.record.variable}}expressions in the field to also render as literal text.