From 488eb4fd026e82db80032fa582e3e6c49256f409 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sat, 3 Feb 2024 09:00:45 -0800
Subject: fix(reader): trailing slash for manga

---
 src/routes/reader/+page.svelte | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/routes/reader/+page.svelte')

diff --git a/src/routes/reader/+page.svelte b/src/routes/reader/+page.svelte
index 269debe1..3bdebe5f 100644
--- a/src/routes/reader/+page.svelte
+++ b/src/routes/reader/+page.svelte
@@ -3,7 +3,7 @@
 
 	let submission = '';
 
-	$: mangaDexID = submission.match(/(?<=\/title\/)(.*?)(?=\/)/g);
+	$: mangaDexID = submission.match(/mangadex\.org\/title\/([a-f0-9-]+)\/?/)?.[1];
 </script>
 
 <InputTemplate field="MangaDex URL" bind:submission submitText="Read">
-- 
cgit v1.2.3

