refactor(comparison): drop no-op displayChar mapping

The space→non-breaking-space swap guarded against a lone space collapsing
to zero width, but the line container now uses white-space: pre (inherited
by Character), so spaces keep their width. The derived had been reduced to
a space→space identity; render `char` directly.
This commit is contained in:
Ilia Mashkov
2026-05-31 13:25:33 +03:00
parent 4652857512
commit 02aa27dc48
@@ -34,7 +34,6 @@ const fontB = $derived(comparisonStore.fontB);
let slot = $state<0 | 1>(0);
let slotFonts = $state<[string, string]>(['', '']);
const displayChar = $derived(char === ' ' ? ' ' : char);
const targetFont = $derived(isPast ? fontA?.name ?? '' : fontB?.name ?? '');
$effect(() => {
@@ -63,7 +62,7 @@ $effect(() => {
style:position={slot === s ? 'relative' : 'absolute'}
aria-hidden={slot !== s ? true : undefined}
>
{displayChar}
{char}
</span>
{/each}
</span>