From f308601bfc793dcda8040c6b5ad140d73e62d1e6 Mon Sep 17 00:00:00 2001 From: AKP Date: Tue, 3 Dec 2024 09:35:47 +0000 Subject: [PATCH] Handle hyphens in challenge titles --- aoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aoc b/aoc index f58db61..71e351e 100644 --- a/aoc +++ b/aoc @@ -208,10 +208,10 @@ class CLI(object): page_resp.raise_for_status() matches = re.findall( - r"--- Day \d{1,2}: ([\w \?!]+) ---", page_resp.content.decode() + r"--- Day \d{1,2}: ([\w\- \?!]+) ---", page_resp.content.decode() ) assert len(matches) >= 1, "must be able to discover at least one day title" - day_title = matches[0] + day_title = matches[0].replace("-", " ") # Work out the challenge's directory.