Allow saving empty syntax highlight language.

This commit is contained in:
John Preston 2024-06-21 13:57:31 +04:00
parent c3ed5224c2
commit 46157c99c4

View File

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