diff --git a/aider/watch.py b/aider/watch.py index 5d4855f49..9594de937 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -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