Support PGA. Closes #135

This commit is contained in:
Ian Renton
2026-08-31 21:54:13 +01:00
parent b0caf697ae
commit 1b62d4742b
15 changed files with 94 additions and 19 deletions
+9
View File
@@ -242,6 +242,15 @@ SIGS = [
region_flag="🇩🇪",
refs_globally_unique=False
),
SIG(
name="PGA",
comment_names=["PGA"],
description="Polish Gmina Award",
ref_regex=r"[A-Z]{2}[0-9]{2}",
icon="fa-g",
region_flag="🇵🇱",
refs_globally_unique=False
),
SIG(
name="Toilets",
comment_names=[],
+2 -2
View File
@@ -31,10 +31,10 @@ def infer_mode_from_comment(comment):
"""Infer a mode from the comment"""
for mode in ALL_MODES:
if re.match(r"(^|\W)" + mode + r"($|\W)", comment, re.IGNORECASE):
if re.search(r"(^|\W)" + mode + r"($|\W)", comment, re.IGNORECASE):
return mode
for mode in MODE_ALIASES:
if re.match(r"(^|\W)" + mode + r"($|\W)", comment, re.IGNORECASE):
if re.search(r"(^|\W)" + mode + r"($|\W)", comment, re.IGNORECASE):
return MODE_ALIASES[mode]
return None