Merge branch 'master' into feature/env-manager

This commit is contained in:
Liyas Thomas
2020-02-24 13:52:30 +05:30
committed by GitHub
3 changed files with 20 additions and 2 deletions

11
functions/editorutils.js Normal file
View File

@@ -0,0 +1,11 @@
const mimeToMode = {
"text/plain": "plain_text",
"text/html": "html",
"application/xml": "xml",
"application/hal+json": "json",
"application/json": "json"
}
export function getEditorLangForMimeType(mimeType) {
return mimeToMode[mimeType] || "plain_text";
}