mirror of https://github.com/Mai-with-u/MaiBot.git
🤖 自动格式化代码 [skip ci]
parent
cdebc31ef6
commit
3d0c594df2
|
|
@ -104,6 +104,7 @@ async def analyze_chat_for_nicknames(
|
|||
response_content = response_content.strip()
|
||||
# 使用正则表达式处理各种 Markdown 代码块情况
|
||||
import re
|
||||
|
||||
markdown_code_regex = re.compile(r"^```(?:\w+)?\s*\n(.*?)\n\s*```$", re.DOTALL)
|
||||
match = markdown_code_regex.match(response_content)
|
||||
if match:
|
||||
|
|
|
|||
Loading…
Reference in New Issue