Support COTA. Closes #131

This commit is contained in:
Ian Renton
2026-08-31 21:17:55 +01:00
parent a33f02491d
commit b0caf697ae
13 changed files with 81 additions and 18 deletions
+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.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