1
0
mirror of synced 2024-11-25 00:00:27 +01:00

patterns: Fixed MIME pragma not being registered correctly

This commit is contained in:
WerWolv 2022-04-27 08:54:38 +02:00
parent 9d556ecc0f
commit 87e616ad23
2 changed files with 3 additions and 1 deletions

View File

@ -80,6 +80,8 @@ namespace hex::plugin::builtin {
return false;
}
});
ContentRegistry::PatternLanguage::addPragma("MIME", [](pl::PatternLanguage&, const std::string &value) { return !value.empty(); });
}
}

View File

@ -144,7 +144,7 @@ namespace hex::plugin::builtin {
}
}
runtime.removePragma("MIME");
runtime.addPragma("MIME", [](pl::PatternLanguage&, const std::string &value) { return !value.empty(); });
if (!this->m_possiblePatternFiles.empty()) {
this->m_selectedPatternFile = 0;