XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

fix(read_text): improve regex to capture text block endings

c2cb04ee
hlohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -1
Modified etc/tool/copilot.py +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: