mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: update regex to only match ai comments at end of line
This commit is contained in:
parent
ddbe2853ea
commit
2cc671df75
1 changed files with 1 additions and 2 deletions
|
@ -66,8 +66,7 @@ class FileWatcher:
|
|||
"""Watches source files for changes and AI comments"""
|
||||
|
||||
# Compiled regex pattern for AI comments
|
||||
# make this pattern match at the end of a line ai!
|
||||
ai_comment_pattern = re.compile(r"(?:#|//) *(ai\b.*|ai|.*\bai!)", re.IGNORECASE)
|
||||
ai_comment_pattern = re.compile(r"(?:#|//) *.*\bai!? *$", re.IGNORECASE)
|
||||
|
||||
def __init__(self, coder, gitignores=None, verbose=False):
|
||||
self.coder = coder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue