Skip to content

Commit 257a732

Browse files
authored
Fixed regex to parse codes correctly
1 parent 963b241 commit 257a732

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eshop/src/routes/login_.help.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function LoginHelp() {
2020
<img className="w-full rounded-md mt-3" src={aoc_id} alt="Find your AoC ID on the Settings page within the AoC website, and it should say next to 'Anonymous User'." />
2121
</p>
2222
</div>
23-
<div className="bg-christmasBeigeAccent rounded-lg p-4">
23+
<div className240997-5="bg-christmasBeigeAccent rounded-lg p-4">
2424
<h3 className="text-2xl font-display mb-3">What is the Leaderboard?</h3>
2525
<p>
2626
It is necessary to join a 'CompSoc Private Leadeboard' on Advent of Code in order for us to track your progress and sync your stars with this website. Once you've created an account on Advent of Code, you can join a leaderboard through
@@ -68,7 +68,7 @@ export default function LoginHelp() {
6868

6969
export async function loader() {
7070
const env_join_codes = process.env.AOC_LEADERBOARD_JOIN_CODES;
71-
const regex = /([0-9-]+) *(?:\((.+)\))?/;
71+
const regex = /([a-z0-9-]+) *(?:\((.+)\))?/;
7272
const join_codes = env_join_codes?.split(",")?.map(v => v.trim().match(regex))?.filter(match => match !== null)?.map((match) => {
7373
return {
7474
code: match[1],

0 commit comments

Comments
 (0)