Convert markdown links to just links.

This commit is contained in:
OK
2023-03-30 17:33:58 +02:00
parent 9eda81d7eb
commit 24ae6bcf32
2 changed files with 17 additions and 1 deletions
+2
View File
@@ -127,6 +127,8 @@ class AIResponder(object):
response['answer_needed'] = False
else:
response['answer'] = str(response['answer'])
response['answer'] = re.sub(r'@\[([^\]]*)\]\([^\)]*\)', r'\1', response['answer'])
response['answer'] = re.sub(r'\[[^\]]*\]\(([^\)]*)\)', r'\1', response['answer'])
return AIResponse(response['answer'],
response['answer_needed'],
parse_maybe_json(response['staff']),