chadtmiller.com/knotless
Git hosted in your atproto account, on any stock PDS, fast enough for agents.
git clone knotless://chadtmiller.com/knotlessneeds the knotless git helper. set it up
<script lang="ts">
import { page } from '$app/state';
import { highlight, target } from '#lib/highlight.ts';
/** A text file, with a gutter of line numbers to link to. */
let { text, lines, ranges }: { text: string; lines: number; ranges: string | null } = $props();
let code: HTMLElement | undefined = $state();
$effect(() => {
void text;
const m = /^#L(\d+)$/.exec(page.url.hash);
target(code, m ? +m[1] : null);
return () => target(undefined, null);
});
</script>
<div class="code"><pre class="ln" aria-hidden="true">{#each { length: lines }, i (i)}<a id="L{i + 1}" href="#L{i + 1}">{i + 1}</a>{'\n'}{/each}</pre><pre class="src" use:highlight={{ ranges, text }}><code bind:this={code}>{text}</code></pre></div>