Conformance Examples 0.1.0 — Render: trim-rendering¶
trim-open-strips-leading-template-text¶
{{~ /s }} strips whitespace from the preceding template text (trimOpen). The interpolated value itself is untouched.
Template
Context
Output
trim-close-strips-trailing-template-text¶
{{ /s ~}} strips whitespace from the following template text (trimClose). The interpolated value itself is untouched.
Template
Context
Output
trim-both-strips-surrounding-template-text¶
{{~ /s ~}} strips whitespace from the template text on both sides of the tag.
Template
Context
Output
trim-open-does-not-touch-value-whitespace¶
trimOpen strips template text, never the interpolated value's own whitespace.
Template
Context
Output
trim-close-no-template-whitespace-is-no-op¶
trimClose is a no-op when the following template text has no leading whitespace to strip.
Template
Context
Output
unescaped-trim-open-strips-leading-template-text¶
{{{~ /s }}} strips whitespace from the preceding template text; the unescaped value is untouched.
Template
Context
Output
unescaped-trim-close-strips-trailing-template-text¶
{{{ /s ~}}} strips whitespace from the following template text; the unescaped value is untouched.
Template
Context
Output
with-block-trim-reaches-into-body¶
~ on the #with opener's close side and the /with closer's open side strips whitespace from just inside the block body, leaving text outside the block untouched.
Template
Context
Output
with-block-trim-reaches-outside-body¶
~ on the #with opener's open side and the /with closer's close side strips whitespace from the text surrounding the whole block, leaving the body untouched.
Template
Context
Output
each-block-trim-reaches-into-body-every-iteration¶
~ on the #each opener's close side and the /each closer's open side strips whitespace from just inside the loop body; the strip applies on every iteration since it is resolved on the body's own AST once, before any iteration runs.
Template
Context
Output
each-block-else-trim¶
~ on the {{else}} tag strips whitespace across the else-body boundary when the list is empty and the else branch renders.
Template
Context
Output
if-block-else-if-arm-trim¶
~ on an {{else if}} tag's open side strips the trailing whitespace of the previous arm's body, even though that arm — not the else-if arm — is the one that ends up rendering.
Template
Context
Output
if-block-else-trim¶
~ on a plain {{else}} tag strips whitespace across the arm/else-body boundary when the else branch renders.
Template
Context
Output
unless-block-trim-reaches-outside-body¶
~ on the #unless opener's open side and the /unless closer's close side strips whitespace surrounding the whole block, leaving the body untouched.
Template
Context
Output
comment-trim-both¶
~ on both sides of a comment tag strips the surrounding template text; the comment itself never renders anything.
Template
Output
assign-trim-both¶
~ on both sides of an assign tag strips the surrounding template text; the tag itself never renders anything.
Template
Output
Source fixture: render/trim-rendering.json