diff --git a/lib/codemirror.js b/lib/codemirror.js index d08aa67f67095b803859b8b30e00eb930ec65caf..65bfc7999ea7f6acc4448333b039e6ac0f7a6e9c 100644 --- a/lib/codemirror.js +++ b/lib/codemirror.js @@ -5533,6 +5533,8 @@ spec.name = found.name; } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { return CodeMirror.resolveMode("application/xml"); + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) { + return CodeMirror.resolveMode("application/json"); } if (typeof spec == "string") return {name: spec}; else return spec || {name: "null"};