{#each tokens as token, tokenIdx (tokenIdx)} {#if token.type === 'escape'} {unescapeHtml(token.text)} {:else if token.type === 'html'} {:else if token.type === 'link'} {@const noteId = getNoteIdFromHref(token.href)} {#if noteId} {:else if token.tokens} handleLinkClick(e, token.href)} > {:else} handleLinkClick(e, token.href)}>{token.text} {/if} {:else if token.type === 'image'} {token.text} {:else if token.type === 'strong'} {:else if token.type === 'em'} {:else if token.type === 'codespan'} {:else if token.type === 'br'}
{:else if token.type === 'del'} {:else if token.type === 'inlineKatex'} {#if token.text} {/if} {:else if token.type === 'iframe'} {:else if token.type === 'mention'} {:else if token.type === 'footnote'} {@html DOMPurify.sanitize( `${token.escapedText}` ) || ''} {:else if token.type === 'citation'} {#if (sourceIds ?? []).length > 0} {:else} {/if} {:else if token.type === 'text'} {/if} {/each}