fix: update regex pattern to use word boundary instead of word character

This commit is contained in:
Paul Gauthier (aider) 2024-10-25 13:22:38 -07:00
parent d535035bdd
commit 378c67d51f

View file

@ -102,7 +102,7 @@ def watch_source_files(
content = f.read()
import re
return bool(re.search(r"(?:^|\n)(?:#|//) *ai\w", content, re.IGNORECASE))
return bool(re.search(r"(?:^|\n)(?:#|//) *ai\b", content, re.IGNORECASE))
except (IOError, UnicodeDecodeError):
return False