{#if token.type === 'code'} {#if token.lang === 'mermaid'}
{revertSanitizedResponseContent(token.text)}
{:else} {/if} {:else if token.type === 'image'} {token.text} {:else} {#each content as part} {@html part.startsWith('{{@IMAGE ') || part.startsWith('{{@CODE ') ? '' : part} {#if images.length > 0 && part.startsWith('{{@IMAGE ')} {@const img = images[parseInt(part.match(/{{@IMAGE (\d+)}}/)[1])]}
{:else if codes.length > 0 && part.startsWith('{{@CODE ')} {@const _code = codes[parseInt(part.match(/{{@CODE (\d+)}}/)[1])]}
{/if} {/each} {/if}