From 378c67d51f258f8f49796bb33ef2e485ac5010fe Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 25 Oct 2024 13:22:38 -0700 Subject: [PATCH] fix: update regex pattern to use word boundary instead of word character --- aider/watch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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