{#if hasChildren(leaf)} {#if isLink(leaf)} {#each leaf.children as leafChild} {/each} {:else} {#each leaf.children as leafChild} {/each} {/if} {:else if isSpan(leaf)} {leaf.value} {:else} {/if}