Skip to content

Commit

Permalink
patterns: Fixed MIME pragma not being registered correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Apr 27, 2022
1 parent 9d556ec commit 87e616a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions plugins/builtin/source/content/pl_pragmas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ namespace hex::plugin::builtin {
return false;
}
});

ContentRegistry::PatternLanguage::addPragma("MIME", [](pl::PatternLanguage&, const std::string &value) { return !value.empty(); });
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 87e616a

Please sign in to comment.