Adding change to init update in PM

This commit is contained in:
ralph
2013-03-28 15:44:44 -04:00
parent ee476fd642
commit 44b4cd860c
35 changed files with 2988 additions and 8 deletions

View File

@@ -0,0 +1,14 @@
// Depends on jsonlint.js from https://github.com/zaach/jsonlint
CodeMirror.jsonValidator = function(text) {
var found = [];
jsonlint.parseError = function(str, hash) {
var loc = hash.loc;
found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
message: str});
};
try { jsonlint.parse(text); }
catch(e) {}
return found;
};