返回提交历史
Modified
etc/tool/copilot.py
+1
-1
XFEstudio/gpt4free
fix(read_text): improve regex to capture text block endings
c2cb04ee
代码差异
1 个文件
+1
-1
@@ -86,7 +86,7 @@ def read_text(text: str) -> str:
86
86
Returns:
87
87
str: The extracted text.
88
88
"""
89
match = re.search(r"```(markdown|)\n(?P<text>[\S\s]+?)\n```", text)
89
match = re.search(r"```(markdown|)\n(?P<text>[\S\s]+?)\n(```|---|$)", text)
90
90
if match:
91
91
return match.group("text")
92
92
else: