mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +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,
|
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):
|
def find_original_update_blocks(content):
|
||||||
for match in pattern.finditer(content):
|
for match in pattern.finditer(content):
|
||||||
_, path, _, original, updated = match.groups()
|
_, path, _, original, updated = match.groups()
|
||||||
path = path.strip()
|
path = path.strip()
|
||||||
yield path, original, updated
|
yield path, original, updated
|
||||||
|
|
||||||
|
|
||||||
|
def test_find_original_update_blocks():
|
||||||
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue