Skip to content

Commit

Permalink
change back to regex from re
Browse files Browse the repository at this point in the history
  • Loading branch information
similato87 committed Aug 5, 2024
1 parent 951404e commit 1401ba7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gpt_engineer/core/chat_to_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

from typing import Dict, Tuple

from regex import regex

from gpt_engineer.core.diff import ADD, REMOVE, RETAIN, Diff, Hunk
from gpt_engineer.core.files_dict import FilesDict, file_to_lines_dict

Expand Down Expand Up @@ -129,7 +131,7 @@ def parse_diffs(diff_string: str) -> dict:
- dict: A dictionary of Diff objects keyed by filename.
"""
# Regex to match individual diff blocks
diff_block_pattern = re.compile(
diff_block_pattern = regex.compile(
r"```.*?\n\s*?--- .*?\n\s*?\+\+\+ .*?\n(?:@@ .*? @@\n(?:[-+ ].*?\n)*?)*?```",
re.DOTALL,
)
Expand Down

0 comments on commit 1401ba7

Please sign in to comment.