Restructured code in regex matching for better performance

This commit is contained in:
afolivieri 2024-10-11 18:34:56 +03:00
parent 034936539a
commit c81fc0dfdc

View File

@ -101,7 +101,7 @@ def load_patterns():
def escape_markdown(text): def escape_markdown(text):
return regex.sub(r'(\*\*)', r'\\\1', text) return regex.sub(r'(\*\*)', '* *', text)
async def shutdown(signal, client, loop): async def shutdown(signal, client, loop):