{#each parsedHTML as part} {@const match = rules.find((rule) => rule.regex.test(part))} {#if match} {@html part} {:else} {@html part} {/if} {/each}