Implemented the sep helper.

This commit is contained in:
Tom Alexander
2020-06-07 15:09:37 -04:00
parent 3fb91566bb
commit fdecdcb53b
2 changed files with 65 additions and 1 deletions

View File

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