diff --git a/main.py b/main.py index 61bff77..e61f123 100644 --- a/main.py +++ b/main.py @@ -31,11 +31,25 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) -> # Simple markdown to HTML conversion html = markdown.markdown(response_text) - # Basic cleanup for Telegram + # Basic cleanup for Telegram HTML compatibility html = html.replace('', '').replace('', '') html = html.replace('', '').replace('', '') html = re.sub(r'
(.*?)
', r'\1\n\n', html, flags=re.DOTALL) + # Handle lists - convert to simple bullet points + html = re.sub(r'