Add '-' to the list of reserved characters.

GitOrigin-RevId: 97a77a46d7003e53021198bd1b57894df4fa5108
This commit is contained in:
levlam 2019-12-25 01:57:33 +03:00
parent 8045132040
commit 3c83e72c49
2 changed files with 2 additions and 2 deletions

View File

@ -1471,7 +1471,7 @@ static Result<vector<MessageEntity>> 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:

View File

@ -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) {