Skip to content

Commit 3604816

Browse files
committed
Merge branch '179-docs-update-docs-with-the-new-functionalities' of https://github.com/Cloud-Code-AI/kaizen into 179-docs-update-docs-with-the-new-functionalities
2 parents 6bf1b7c + faf2e8b commit 3604816

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kaizen/helpers/parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ def extract_json(text):
1111

1212
# Extract the JSON data from the text
1313
json_data = text[start_index:end_index]
14-
json_data = re.sub(r"\s*\\*\n*\s*{\s*\\*\n*\s*", "{", json_data)
15-
json_data = re.sub(r"\s*\\*\n*\s*\[\s*\\*\n*\s*", "[", json_data)
16-
json_data = re.sub(r"\s*\\*\n*\s*}\s*\\*\n*\s*", "}", json_data)
17-
json_data = re.sub(r"\s*\\*\n\s*\]\s*\\*\n\s*", "]", json_data)
14+
json_data = re.sub(r"\s*\\*\n*\s*{\s*\n*\s*", "{", json_data)
15+
json_data = re.sub(r"\s*\\*\n*\s*\[\s*\n*\s*", "[", json_data)
16+
json_data = re.sub(r"\s*\\*\n*\s*}\s*\n*\s*", "}", json_data)
17+
json_data = re.sub(r"\s*\\*\n\s*\]\s*\n\s*", "]", json_data)
1818
json_data = re.sub(r",\s*\\*\n\s*", ",", json_data)
1919
json_data = re.sub(r'"\s*\\*\n\s*', '"', json_data)
2020
json_data = json_data.replace("\n", "\\n")

0 commit comments

Comments
 (0)