~ knotless Search/
↑↓ move↵ open⇧↵ all results

johnandersen777.bsky.social/knotless

git that lives in your Atmosphere account

Forked from chadtmiller.com/knotless

0
0
15 lines · 567 B Raw History
<script lang="ts">
	/**
	 * What a runner or the queue said, its `backticked` parts as code: a
	 * command reads as one, not as text with backticks round it, and breaks
	 * only between its words, never inside a flag such as `--log`.
	 */
	let { text }: { text: string } = $props();
	const parts = $derived(text.split('`').map((t, i) => ({ t, code: i % 2 === 1 })));
</script>

<span class="said-text"
	>{#each parts as p, i (i)}{#if p.code}<code
				>{#each p.t.split(' ') as w, j (j)}{j ? ' ' : ''}<span>{w}</span>{/each}</code
			>{:else}{p.t}{/if}{/each}</span
>