Sha256: 8369747dd3164e413b58aeda0ea2bc9cee92e93900a1baa0ae447089948be1f4
Contents?: true
Size: 556 Bytes
Versions: 11
Compression:
Stored size: 556 Bytes
Contents
// Depends on jsonlint.js from https://github.com/zaach/jsonlint // declare global: jsonlint CodeMirror.registerHelper("lint", "json", 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; }); CodeMirror.jsonValidator = CodeMirror.lint.json; // deprecated
Version data entries
11 entries across 11 versions & 3 rubygems