Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 423352 - Remove support for CSS, Java, JSON, JS
  • Loading branch information
mamacdon committed Dec 5, 2013
1 parent 01c7732 commit be50b87
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/js/codeMirrorPlugin.js
Expand Up @@ -87,7 +87,20 @@ require([
"application/xml": ["xml"],
"text/x-yaml": ["yaml", "yml"]
};

/**
* Filters out Content Types that are handled natively by Orion. We do not want to override their highlighting.
*/
function isNonNativeContentType(ct) {
switch (ct.id) {
case "application/javascript":
case "application/json":
case "text/css":
case "text/html":
case "text/x-java":
return false;
}
return true;
}
function getMimeForContentTypeId(contentTypeId) {
return contentType2Mime[contentTypeId] || contentTypeId;
}
Expand All @@ -110,7 +123,7 @@ require([
extension: mime2Ext[mime],
"extends": "text/plain"
};
});
}).filter(isNonNativeContentType);
}
function createForm() {
var list = document.getElementById("modelist");
Expand Down

0 comments on commit be50b87

Please sign in to comment.