Skip to content

Conformance Examples 0.1.0 — Partials: partial-blocks-close-forms

partial-block-bare-close-renders-fallback-on-miss

The bare {{/>}} close form, with no name, closes the currently-open partial block with no name validation.

Template

{{#> myPartial }}Failover{{/>}}

Partials

Output

Failover

partial-block-matching-named-close-renders-identically-to-the-bare-close

A named close whose name equals the open key is accepted and produces exactly the same output as the bare close form.

Template

{{#> myPartial }}Failover{{/> myPartial }}

Partials

Output

Failover

partial-block-standalone-opener-and-closer-lines-are-stripped

A {{#> }} opener and {{/>}} closer each alone on their own line (only surrounding whitespace) have that line's leading indentation and trailing newline stripped, exactly like a standalone #with block; the fallback body's own text is left untouched.

Template

before
  {{#> myPartial }}
  Failover
  {{/>}}
after

Partials

Output

before
  Failover
after

tilde-trim-on-partial-block-tags-strips-surrounding-and-inner-whitespace

~ on a {{#> }}/{{/>}} tag pair strips whitespace from the surrounding template text (outside the block) and from the fallback body's own leading/trailing text (inside the block), exactly like the equivalent {{#with}} trim behavior.

Template

before  {{~#> myPartial ~}}  Failover  {{~/>~}}  after

Partials

Output

beforeFailoverafter

Source fixture: partials/partial-blocks-close-forms.json