Fixed time zone calculation issue
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / js / 3rdParty / codemirror / addon / lint / json-lint.js
1 // Depends on jsonlint.js from https://github.com/zaach/jsonlint
2
3 CodeMirror.jsonValidator = function(text) {
4 var found = [];
5 jsonlint.parseError = function(str, hash) {
6 var loc = hash.loc;
7 found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
8 to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
9 message: str});
10 };
11 try { jsonlint.parse(text); }
12 catch(e) {}
13 return found;
14 };