-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: can't parse entities: Can't find end of Bold entity at byte offset 3676
Originally posted by @sudoskys in #70 (comment)
Nested formatting is not being properly handled, when parsing the syntax tree specifically at:
telegramify-markdown/playground/markdownify_case.py
Lines 78 to 79 in 9a81090
| *bold _italic bold ~~italic bold strikethrough ||italic bold strikethrough spoiler||~~ __underline italic bold___ bold* | |
| __underline italic bold__ |
In case of ambiguity between
italicandunderlineentities__is always greadily treated from left to right as beginning or end of anunderlineentity, so instead of___italic underline___use___italic underline_**__, adding an empty bold entity as a separator.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request