mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Support COTA. Closes #131
This commit is contained in:
@@ -233,6 +233,15 @@ SIGS = [
|
||||
icon="fa-ship",
|
||||
region_flag="🇬🇧"
|
||||
),
|
||||
SIG(
|
||||
name="COTA",
|
||||
comment_names=["COTA"],
|
||||
description="Castles on the Air",
|
||||
ref_regex=r"[A-Z]{3}\-[0-9]{3,5}",
|
||||
icon="fa-chess-rook",
|
||||
region_flag="🇩🇪",
|
||||
refs_globally_unique=False
|
||||
),
|
||||
SIG(
|
||||
name="Toilets",
|
||||
comment_names=[],
|
||||
|
||||
+2
-2
@@ -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.match(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.match(r"(^|\W)" + mode + r"($|\W)", comment, re.IGNORECASE):
|
||||
return MODE_ALIASES[mode]
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user