-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot handle blockquotes (>
)
#5
Comments
You are welcome, sorry I missed the last of your tickets. Yes you are right Telegram's markdown doesn't support blockquotes, so I don't process them because if I start processing them then I need to process other things like tables etc. which are not possible. Of course, there are several different solutions, for example, removing unsupported content or displaying it as code, but each of these solutions may be suitable for some library users and at the same time not suitable for others. Therefore, I would advise you to take a look at the convert.js file and create your own version in your project, adding your own handlers for elements that are not supported by Telegram's markdown. |
Thank you! That makes sense. But I think we can at least escape those characters so telegram will not raise an error and instead display them as-is?
|
Okay, since you're not the first person who asks this, I'll do the following: const escapedResult = telegramifyMarkdown(markdown, {}, true); |
Ok I've changed my mind a bit, I've added more options, you can check them here |
🎉 This issue has been resolved in version 1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks! |
Sorry to trouble you again. But first of all, I want to say thank you very much for developing this library! I'm currently using it with my ChatGPT Telegram bot, and most of the time it works very well, but sometimes there are small bugs that cause messages not to be parsed correctly. Really hope this can be fixed.
Describe the bug
Cannot handle blockquotes (
>
)To Reproduce
Convert the following text:
Current behavior
Did not escape
>
.Then Telegram will raise an error:
Expected behavior
It seems that Telegram's Markdown does not support blockquotes. Maybe we can turn it into a code block or something else?
The text was updated successfully, but these errors were encountered: