From 58f6975e9a51d41a028f73570a50763563369857 Mon Sep 17 00:00:00 2001
From: mat <github@matdoes.dev>
Date: Wed, 30 Mar 2022 19:18:58 +0000
Subject: farming contest info

---
 src/lib/Toc.svelte | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/lib/Toc.svelte')

diff --git a/src/lib/Toc.svelte b/src/lib/Toc.svelte
index cced057..882ebdd 100644
--- a/src/lib/Toc.svelte
+++ b/src/lib/Toc.svelte
@@ -1,5 +1,5 @@
 <script lang="ts">
-	import { cleanId } from './utils'
+	import { cleanId, toTitleCase } from './utils'
 
 	export let categories: string[]
 </script>
@@ -8,7 +8,7 @@
 	<h3>Contents</h3>
 	<ul>
 		{#each categories as category}
-			<li><a href="#{category}">{cleanId(category)}</a></li>
+			<li><a href="#{category.replace(/[ _]/, '-')}">{toTitleCase(cleanId(category))}</a></li>
 		{/each}
 	</ul>
 </div>
-- 
cgit 

