perf: skip re-splitting unchanged text tokens (#26326)

This commit is contained in:
Algorithm5838
2026-06-28 22:09:58 -05:00
committed by GitHub
parent ea3f5f22d2
commit 6729e64f30
@@ -1,12 +1,14 @@
<script lang="ts">
export let token;
export let done = true;
$: raw = token?.raw ?? '';
</script>
{#if done}
{token?.raw}
{raw}
{:else}
{#each (token?.raw ?? '').split(' ') as text}
{#each raw.split(' ') as text}
<span class="fade-in-token">
{text}{' '}
</span>