mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
wip
This commit is contained in:
parent
797372c69e
commit
ae41782cb4
1 changed files with 12 additions and 0 deletions
|
@ -145,9 +145,21 @@ pattern = re.compile(
|
|||
re.MULTILINE | re.DOTALL,
|
||||
)
|
||||
|
||||
ORIGINAL = "<<<<<<< ORIGINAL"
|
||||
DIVIDER = "======="
|
||||
UPDATED = ">>>>>>> UPDATED"
|
||||
|
||||
separators = "|".join([ORIGINAL, DIVIDER, UPDATED])
|
||||
|
||||
split_re = re.compile(r"^(" + separators + r")\s*\n")
|
||||
|
||||
|
||||
def find_original_update_blocks(content):
|
||||
for match in pattern.finditer(content):
|
||||
_, path, _, original, updated = match.groups()
|
||||
path = path.strip()
|
||||
yield path, original, updated
|
||||
|
||||
|
||||
def test_find_original_update_blocks():
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue