From 46157c99c4659119b938676f6edfc981da6804e7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 21 Jun 2024 13:57:31 +0400 Subject: [PATCH] Allow saving empty syntax highlight language. --- Telegram/SourceFiles/chat_helpers/message_field.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/chat_helpers/message_field.cpp b/Telegram/SourceFiles/chat_helpers/message_field.cpp index 465830fd1..38435758e 100644 --- a/Telegram/SourceFiles/chat_helpers/message_field.cpp +++ b/Telegram/SourceFiles/chat_helpers/message_field.cpp @@ -252,7 +252,7 @@ void EditCodeLanguageBox( const auto callback = [=] { const auto name = field->getLastText().trimmed(); - const auto check = QRegularExpression("^[a-zA-Z0-9\\+\\-]+$"); + const auto check = QRegularExpression("^[a-zA-Z0-9\\+\\-]*$"); if (check.match(name).hasMatch()) { auto weak = Ui::MakeWeak(box); save(name);