Replies: 1 comment
-
Maybe in future(if not near) we will add option to ignore markdown characters. I'll consider it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello pyTelegramBotAPI Team,
I'm currently facing an issue with sending large text messages that contain Markdown formatting. Telegram has a message limit of 4096 characters, and your library provides a useful function
util.smart_split
to divide a message into smaller parts. However, this function doesn't consider Markdown syntax, leading to potential Markdown errors when a message is split in the middle of Markdown elements.For example:
This code works well for plain text, but if large_text includes Markdown elements, splitting it might disrupt the Markdown formatting, causing Telegram to return a Markdown error.
Do you have any recommendations or plans to enhance smart_split to handle Markdown formatting? Or could you suggest an alternative approach to tackle this problem?
Thank you for your time and assistance.
Beta Was this translation helpful? Give feedback.
All reactions