atlasbot: fix word boundary detection
This commit is contained in:
parent
380aae3b2c
commit
4b468b0f97
@ -553,7 +553,7 @@ def _has_any(text: str, phrases: tuple[str, ...]) -> bool:
|
|||||||
if phrase in text:
|
if phrase in text:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
if re.search(rf"\\b{re.escape(phrase)}\\b", text):
|
if re.search(rf"\b{re.escape(phrase)}\b", text):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user