diff --git a/td/telegram/MessageEntity.cpp b/td/telegram/MessageEntity.cpp index 953768c79..b58cf8628 100644 --- a/td/telegram/MessageEntity.cpp +++ b/td/telegram/MessageEntity.cpp @@ -1471,7 +1471,7 @@ static Result> do_parse_markdown_v2(CSlice text, string &r continue; } - Slice reserved_characters("_*[]()~`>#+=|{}.!"); + Slice reserved_characters("_*[]()~`>#+-=|{}.!"); if (!nested_entities.empty()) { switch (nested_entities.back().type) { case MessageEntity::Type::Code: diff --git a/test/message_entities.cpp b/test/message_entities.cpp index 780643bf8..be3ac1a39 100644 --- a/test/message_entities.cpp +++ b/test/message_entities.cpp @@ -872,7 +872,7 @@ static void check_parse_markdown(td::string text, td::Slice error_message) { } TEST(MessageEntities, parse_markdown) { - td::Slice reserved_characters("]()>#+=|{}.!"); + td::Slice reserved_characters("]()>#+-=|{}.!"); td::Slice begin_characters("_*[~`"); for (char c = 1; c < 126; c++) { if (begin_characters.find(c) != td::Slice::npos) {