Skip to content

Conformance Examples 0.1.0 — Render: no-reinterpolation

escaped-value-with-tag-not-reparsed

An escaped interpolation whose resolved value contains tag-like text renders that text literally; it is not re-scanned for tags.

Template

{{ /x }}

Context

{
    "x": "{{ /y }}",
    "y": "SECRET"
}

Output

{{ /y }}

unescaped-value-with-tag-not-reparsed

An unescaped interpolation whose resolved value contains tag-like text renders that text literally; it is not re-scanned for tags.

Template

{{{ /x }}}

Context

{
    "x": "{{ /y }}",
    "y": "SECRET"
}

Output

{{ /y }}

value-with-block-syntax-not-reparsed

A resolved value containing block-tag syntax renders literally; it is not re-parsed as a block.

Template

{{ /x }}

Context

{
    "x": "{{#if a}}Z{{/if}}"
}

Output

{{#if a}}Z{{/if}}

value-with-escaped-delimiter-literal

A resolved value containing an escaped-delimiter sequence renders that sequence literally; it is not unescaped a second time.

Template

{{ /x }}

Context

{
    "x": "\\{{ y }}"
}

Output

\{{ y }}

each-element-value-not-reparsed

Array elements containing tag-like text render literally inside an each body; they are not re-scanned for tags.

Template

{{#each xs }}[{{ this }}]{{/each}}

Context

{
    "xs": [
        "{{ a }}",
        "{{ b }}"
    ]
}

Output

[{{ a }}][{{ b }}]

Source fixture: render/no-reinterpolation.json