Handle hyphens in challenge titles

This commit is contained in:
akp 2024-12-03 09:35:47 +00:00
parent aad333b470
commit f308601bfc
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

4
aoc
View file

@ -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.