Add support for processing language parameter in message entities#2466
Add support for processing language parameter in message entities#2466Badiboy merged 3 commits intoeternnoir:masterfrom
Conversation
|
Looks fine. Did you perform tests of this update? |
|
I updated the test file with some optimisations. For the issues mentioned above, environment variables are used directly. All tests now pass. Also, I added tests for the |
You need to pass YOUR bot token there. |
Not absolutely correct due to TOKEN var may not exist if nothing in environment, but better then ''... |
I saw environment variables for token, but some tests used them and some didn't, so I was confused. I updated to use the same environment variables for all tests so we don't have to manually edit the test files. |
|
func is designed wrong. Otherwise symbols like < and > will break the markdown. |
Thanks for pointing out the problem. I've modified the code along the lines of your idea and added a test for special characters. |
|
Thank you! |
There was a problem hiding this comment.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/test_telebot.py:47
- Ensure that TOKEN is defined and imported in this test file to prevent an undefined variable error.
tb = telebot.TeleBot(TOKEN)
@pplulee It was just for test ) |


Description
Add support for processing code language parameter in
<pre>tag under message entitiesDescribe your tests
How did you test your change?
Python version: 3.12
OS: Windows 11
Send a message containing a code block to the bot, then see the result of the parsed HTML code.
Checklist: