Skip to content

Conformance Examples 0.1.0 — Render: interpolation-matrix

matrix-string-escaped

String value, escaped interpolation: renders unquoted, as-is (no HTML-special characters here; see html-escaping.json for escaping behavior).

Template

{{ /v }}

Context

{
    "v": "Alice"
}

Output

Alice

matrix-string-unescaped

String value, unescaped interpolation: renders unquoted, as-is.

Template

{{{ /v }}}

Context

{
    "v": "Alice"
}

Output

Alice

matrix-integer-escaped

Integer value, escaped interpolation: renders as plain decimal digits.

Template

{{ /v }}

Context

{
    "v": 100
}

Output

100

matrix-integer-unescaped

Integer value, unescaped interpolation: renders as plain decimal digits.

Template

{{{ /v }}}

Context

{
    "v": 100
}

Output

100

matrix-decimal-escaped

Decimal (whole-valued double) value, escaped interpolation: renders per ECMA-262 Number::toString ("1", not "1.0").

Template

{{ /v }}

Context

{
    "v": 1.0
}

Output

1

matrix-decimal-unescaped

Decimal (whole-valued double) value, unescaped interpolation: renders per ECMA-262 Number::toString.

Template

{{{ /v }}}

Context

{
    "v": 1.0
}

Output

1

matrix-boolean-escaped

Boolean value, escaped interpolation: renders as the literal token "true"/"false".

Template

{{ /v }}

Context

{
    "v": true
}

Output

true

matrix-boolean-unescaped

Boolean value, unescaped interpolation: renders as the literal token "true"/"false".

Template

{{{ /v }}}

Context

{
    "v": false
}

Output

false

matrix-null-escaped

Explicit JSON null value, escaped interpolation: renders the literal token "null" (kBars diverges from Mustache here, which renders empty).

Template

x={{ /v }}

Context

{
    "v": null
}

Output

x=null

matrix-null-unescaped

Explicit JSON null value, unescaped interpolation: also renders the literal token "null".

Template

x={{{ /v }}}

Context

{
    "v": null
}

Output

x=null

Source fixture: render/interpolation-matrix.json