duster/js/test_cases/helpers_first/main.dust
2020-06-07 15:16:39 -04:00

30 lines
731 B
Plaintext

Tags inside a first{~n}
==================={~n}
{#people}
{name}{@first petname="fluffy"},{pet}{petname}{/first}
{/people}{~n}
first inside a scalar{~n}
====================={~n}
{#scalar}
{name}{@first petname="fluffy"},{pet}{petname}{/first}
{/scalar}{~n}
Nested first inside another non-array section{~n}
============================================={~n}
{#people}
{#toys}
{name}'s pet {pet} plays with a {.}{@first}, {/first}
{/toys}
{/people}{~n}
Else block inside a first{~n}
========================={~n}
{#people}
{name}{@first},{pet}{petname}{:else}elseblock{/first}
{/people}{~n}
Sep outside any section{~n}
======================={~n}
{@first}first is printed outside any section{/first}